Re: [R] What this message means? (spatstat)

2008-04-14 Thread CT YU
Thank you. Does the spatstat or R need bigger memory? Paul Hiemstra wrote: > > CT YU wrote: >> Hi all, >> When I use the function envelope(???,pcf,i=???,j=???), there are some >> errors >> as followings: >> Error: cannot allocate vector of size 5.3 Mb >> In addition: Warning messages: >> 1: In

[R] glht with a glm using a Gamma distribution

2008-04-14 Thread Jarrett Byrnes
Quick question about the usage of glht. I'm working with a data set from an experiment where the response is bounded at 0 whose variance increases with the mean, and is continuous. A Gamma error distribution with a log link seemed like the logical choice, and so I've modeled it as such.

Re: [R] Plotting with exact axis limits

2008-04-14 Thread Enrico Rossi
That's exactly what I needed! Many thanks to Mark, Daniel and Duncan for your help! Enrico On Mon, Apr 14, 2008 at 8:14 PM, Daniel Malter <[EMAIL PROTECTED]> wrote: > Hi, > > type ?plot [Enter]and click the "par" link in the first line. This takes > you > to all the parameters you can set for plo

Re: [R] looking for a string

2008-04-14 Thread [Ricardo Rodriguez] Your XEN ICT Team
Charles C. Berry wrote: > > You want > > ?regexpr > > Something like > > regexpr("Jalapa", as.character( unidad ) ) != -1 > > HTH, > > Chuck Please, look at this... > substringJalapa <- regexpr("Jalapa", as.character(conagua$unidad ) ) != -1 Hubo 50 o más avisos (use warnings() para v

Re: [R] looking for a string

2008-04-14 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks! Here what I get: Henrique Dallazuanna wrote: > Try something like this: > > x[grep("Jalapa", x$unidad),, drop = F] > > conaguaMexicoSub <- subset(conagua, unidad == x[grep("Jalapa", x$unidad),, drop = F], select = c(equipo,X101:X309)) Error en x$unidad : $ operator is invalid for atomi

Re: [R] looking for a string

2008-04-14 Thread Henrique Dallazuanna
Try something like this: x[grep("Jalapa", x$unidad),, drop = F] On Mon, Apr 14, 2008 at 9:10 PM, [Ricardo Rodriguez] Your XEN ICT Team < [EMAIL PROTECTED]> wrote: > Hi all, > > I have not been able to find an answer to what is a simple question: > > conaguaMexicoSub <- subset(conagua, unidad ==

Re: [R] looking for a string

2008-04-14 Thread Charles C. Berry
On Tue, 15 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote: Hi all, I have not been able to find an answer to what is a simple question: conaguaMexicoSub <- subset(conagua, unidad == "Jalapa", select = c(equipo,X101:X309)) This subset gives me all the rows from conagua where unidad is J

Re: [R] Plotting with exact axis limits

2008-04-14 Thread Daniel Malter
Hi, type ?plot [Enter]and click the "par" link in the first line. This takes you to all the parameters you can set for plot commands. The one you are looking for is: xaxs The style of axis interval calculation to be used for the x-axis. Possible values are "r", "i", "e", "s", "d". The styles are

[R] looking for a string

2008-04-14 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi all, I have not been able to find an answer to what is a simple question: conaguaMexicoSub <- subset(conagua, unidad == "Jalapa", select = c(equipo,X101:X309)) This subset gives me all the rows from conagua where unidad is Jalapa. But, please, how do I get all the rows where unidad contents

Re: [R] Plotting with exact axis limits

2008-04-14 Thread Duncan Murdoch
On 14/04/2008 6:56 PM, Enrico Rossi wrote: > Hello, > > If I make a plot, say something simple like > > plot( runif(100) ) > > then the origin (0,0) is not at the bottom-left corner of the box > surrounding the plot. The axis limits are "padded" slightly. This is > ordinarily a good feature, bec

[R] Plotting with exact axis limits

2008-04-14 Thread Enrico Rossi
Hello, If I make a plot, say something simple like plot( runif(100) ) then the origin (0,0) is not at the bottom-left corner of the box surrounding the plot. The axis limits are "padded" slightly. This is ordinarily a good feature, because it makes plots look better. But now I would like to make

Re: [R] Huber-white cluster s.e. after optim?

2008-04-14 Thread Achim Zeileis
Peter: > Hi Achim: Thanks for the reply! I did notice that robcov() requires > the X & Y and also a scores vector and that these are not readily > available under fixed names or at all in output from such functions as > systemfit and optim. I wonder if it would make sense to have a > stop-gap f

Re: [R] Please help me

2008-04-14 Thread chenxh007
try ?image Xiaohui merca duria wrote: > I have a matrix with N x N points, that I would like to represent on a map. > > The points are an estimation of the bidimensional density of certain > quantity observed on a geographical region. > I am interested in a map with several colours displaying s

[R] Please help me

2008-04-14 Thread merca duria
I have a matrix with N x N points, that I would like to represent on a map. The points are an estimation of the bidimensional density of certain quantity observed on a geographical region. I am interested in a map with several colours displaying several values of the density Can you help me about

[R] merca duria desea chatear

2008-04-14 Thread merca duria
--- merca duria desea mantener el contacto contigo a través de algunos de los mejores productos que Google ha lanzado recientemente. Si ya utilizas Gmail o Google Talk, visita: http://mail.google.com/mail/b-bb1b3747a4-83a9bc2722-f

Re: [R] boxplot tick locations

2008-04-14 Thread Peter Alspach
Sherri Is this what you want? sherri <- data.frame(grp=rep(letters[1:6], 20), value=rnorm(6*20)+6) temp <- with(sherri, boxplot(value~grp, xaxt='n')) axis(1, 1:5+0.5, rep('', 5)) Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sher

[R] Formula with no intercept

2008-04-14 Thread Gang Chen
I'm trying to analyze a model with two variables, one is Group with two levels (male and female), and other is Time with four levels (T1, T2, T3 and T4). And for the convenience of post-hoc testing I wanted to consider a model with no intercept for factor Time, so I tried formula Group*(Time-1) H

[R] boxplot tick locations

2008-04-14 Thread Sherri Heck
hi all- i am creating a boxplot and would like to shift the x-axis tick marks (named 1:23) so that the ticks are in between the boxes and not centered in the middle of the boxes. i have searched the help files and google and have not found what i am looking for. does anyone know how to do this

Re: [R] read data into list of matrix

2008-04-14 Thread Greg Snow
Read the help page on '[', then read it again a couple more times (it can be subtle). I think you want to use fp[[1]] rather than fp[1], the first will return a single element from the list (a data frame in the case below), the second returns a list of length 1 (with that element being a data fram

Re: [R] read data into list of matrix

2008-04-14 Thread Jonas Stein
>> i have a list of many files and want to load them into a list of tables, >> that >> can be adressed with a variable 'i'. > fp <- lapply(files, read.table, header = T) Thank you that works fine. But how can i access the data in column fp$foo now? fp[1]$foo does not work. ps: thank you all f

Re: [R] how to add different type of lines (short dash, long dash) into current plot)

2008-04-14 Thread Philipp Pagel
>I try to add three different lines (solid, short dash, long dash) >in to current barplot. Have a look at the lty parameter. It's documented in ?par. If I understand your question correctly, you may also be interested in segments() to actually draw the lines (or maybe abline()). cu

Re: [R] Vegan R^2 and tau values for metaMDS

2008-04-14 Thread Sarah Goslee
On Mon, Apr 14, 2008 at 4:47 PM, Gavin Simpson <[EMAIL PROTECTED]> wrote: > Note that the default is to produce a bray-curtis dissimilarity matrix > from the input species data. As such, I reproduce this dissimilarity > matrix as arg 1 to cor and then take the Euclidean distances of the > coor

Re: [R] how to add different type of lines (short dash, long dash) into current plot)

2008-04-14 Thread Greg Snow
The "type" argument to plotting functions determines the type of plot (plot lines or points or both or ...). To specify the type of line you need to use the "lty" argument. See the help page for "par" (?par) for details on the types of line you can use (also "lwd" is the width of the lines). B

Re: [R] Vegan R^2 and tau values for metaMDS

2008-04-14 Thread Gavin Simpson
On Mon, 2008-04-14 at 15:38 -0400, Sarah Goslee wrote: > Dimensionality doesn't matter. 2, 3, 14 will all work. > > What matters is that apparently vegan returns the results in some > format other than a straight sites x ordination coordinates matrix, > which is what dist expects. You'll need to c

Re: [R] Matched pairs with two data frames

2008-04-14 Thread Patrick Connolly
On Mon, 14-Apr-2008 at 08:37AM +0200, Udo wrote: |> Zitat von Peter Alspach <[EMAIL PROTECTED]>: |> |> > Udo |> > |> > Seems you might want merge() |> > |> > HTH ... |> > |> > Peter Alspach |> |> Thank you Peter and Jorge, |> |> but as I had written in my last sentence, |> "Merge doesn´t do

[R] Two Colored Heatmap

2008-04-14 Thread dinesh kumar
Hi All I have matrix Like:- 10 20 40 60 100 Glucose UP Down UP No UP Fructose UP UP Down UP No Sucrose UP Down UP No Down Taurine No No No No UP Cellobiose Up

[R] how to make lien smoothly over barplot

2008-04-14 Thread Xin
Dear I try to make lines smoothly which are added on current barplot. I tried to use "smo" and it does not work. Has nayone have this experience? Many Thanks! Xin [[alternative HTML version deleted]] __ R-help@r-project.org mailing lis

Re: [R] Histogram Label Font Size

2008-04-14 Thread Robert Baer
Here's an example to make the text 18 point. You can set ps=6 to make small text. x=rnorm(100) opar=par(ps=18) # Make text 18 point hist(x) opar Rob Baer - Original Message - From: "Sue Lee" <[EMAIL PROTECTED]> To: Sent: Monday, April 14, 2008 2:35 PM Subject: [R] Histogram Label Fon

Re: [R] how to add different type of lines (short dash, long dash) into current plot)

2008-04-14 Thread Henrique Dallazuanna
See matplot function On Mon, Apr 14, 2008 at 4:44 PM, Xin <[EMAIL PROTECTED]> wrote: > Dear > > I try to add three different lines (solid, short dash, long dash) in to > current barplot. I saw there are types of lines ("p","b", ect). However, > they are not what I request. Has nayone have this

Re: [R] Logistic regression

2008-04-14 Thread Dieter Menne
Guillaume Brutel yahoo.fr> writes: > I am trying to fit a non linear regression model to time series data. > > If I do this: > reg.logis = nls(myVar~SSlogis(myTime,Asym,xmid,scal)) > I get this error message (translated to English from French): > Erreur in nls(y ~ 1/(1 + exp((xmid - x)/scal)), d

Re: [R] ctv, install.views, install.packages (& update.packages)

2008-04-14 Thread Achim Zeileis
On Mon, 14 Apr 2008, Vorlow Constantinos wrote: > Dear all, > > Wouldn't it be helpful if the > > install.views > install.packages > update.packages > > had a "downloadonly=TRUE" flag which would allow us to download the > packages and install them later (or put them in a USB stick and take > them

Re: [R] Histogram Label Font Size

2008-04-14 Thread Henrique Dallazuanna
I think that you can edit the source code of histogram for this: myhist <- getS3method("plot", "histogram") body(myhist)[9] <- parse(text = c(capture.output(body(myhist)[9])[-6], "} else labels, adj = c(0.5, -0.5), ...)")) r <- hist(islands, plot = F) myhist(r, labels = T

[R] how to add different type of lines (short dash, long dash) into current plot)

2008-04-14 Thread Xin
Dear I try to add three different lines (solid, short dash, long dash) in to current barplot. I saw there are types of lines ("p","b", ect). However, they are not what I request. Has nayone have this experience? Many Thanks! Xin [[alternative HTML version deleted]] __

Re: [R] read data into list of matrix

2008-04-14 Thread Henrique Dallazuanna
Try this: fp <- lapply(files, read.table, header = T) On Mon, Apr 14, 2008 at 4:21 PM, Jonas Stein <[EMAIL PROTECTED]> wrote: > Hi > > i have a list of many files and want to load them into a list of tables, > that > can be adressed with a variable 'i'. > > something like > > files = c("0125um",

Re: [R] Vegan R^2 and tau values for metaMDS

2008-04-14 Thread Sarah Goslee
Dimensionality doesn't matter. 2, 3, 14 will all work. What matters is that apparently vegan returns the results in some format other than a straight sites x ordination coordinates matrix, which is what dist expects. You'll need to convert it to one, possibly with as.matrix, or extract the coordin

[R] Histogram Label Font Size

2008-04-14 Thread Sue Lee
Hi! I'm having a trouble changing font size of histogram label. I have tried help(hist), but I couldn't find anything explain how to fix label's font size. Could you help me please? Thank you. _ Going green? See the top 12 foods t

[R] read data into list of matrix

2008-04-14 Thread Jonas Stein
Hi i have a list of many files and want to load them into a list of tables, that can be adressed with a variable 'i'. something like files = c("0125um","2000um","2200um","2500um","2700um") for (i in 1:5) { fp[i] <- read.table( files[i] ) } but this does not work of course. Has anyone a g

Re: [R] Vegan R^2 and tau values for metaMDS

2008-04-14 Thread stephen sefick
the below is a three dimensional solution On Mon, Apr 14, 2008 at 3:09 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > cor(x, dist(mds))^2 > Error in dist(mds) : (list) object cannot be coerced to 'double' > > > > On Mon, Apr 14, 2008 at 2:40 PM, Sarah Goslee <[EMAIL PROTECTED]> wrote: > > The

Re: [R] odfWeave: in multi-page plots only last page appears in document

2008-04-14 Thread Kuhn, Max
Another option, if you want them in separate figures, is to write a loop that generates the image file, saves it to the file system, and use odfInsertPlot to put the file into the document. This might work better if you have an unknown number of images that you want to insert. Max -Original

Re: [R] odfWeave: in multi-page plots only last page appears in document

2008-04-14 Thread Tobias Sing
Sarah, thanks for your reply. On Mon, Apr 14, 2008 at 8:32 PM, Sarah Goslee <[EMAIL PROTECTED]> wrote: > If you ran that code outside ODFWeave, you'd only get one plot, > so why would you expect to get more within ODFWeave? No, it depends on the device that is used. If I use PDF or postscript th

Re: [R] odfWeave: in multi-page plots only last page appears in document

2008-04-14 Thread Sarah Goslee
If you ran that code outside ODFWeave, you'd only get one plot, so why would you expect to get more within ODFWeave? for (i in 1:3) { > plot(1,1, main=paste('Plot',i)) > } You need to add some sort of par() command, or use layout(), to create a single plot that contains all three of the plot

[R] Vegan R^2 and tau values for metaMDS

2008-04-14 Thread stephen sefick
I am using the function metaMDS with jaccard distances to ordinate a set of constituent by site matrix. I can post this data if it would be helpful, but it is large to include in an email. I can also provide reproducable code if necessary. I would like to get an R^2 value for the axes of the ord

[R] odfWeave: in multi-page plots only last page appears in document

2008-04-14 Thread Tobias Sing
Dear all, Max, first of all, many thanks for providing the odfWeave package. My problem: Whenever I have multiple plots in one single chunk of my ODF file, only the last plot gets shown. The problem can be reproduced with this toy example (to be used in an ODF file together with odfWeave -- I'm u

Re: [R] two graphs in one figure?

2008-04-14 Thread Greg Snow
OK, here is another approach. Here is a function that will adjust the user coordinate system for you. You give it 2 points in the current coordinates (x1 and y1) and the values that you want the same 2 points to have in the new coordinate system (x2 and y2) and it will change the coordinate syste

Re: [R] linear regression "group by"

2008-04-14 Thread Henrique Dallazuanna
Try: by(x, list(x$STNID), function(.x)lm(TEMP ~ DEWP, data = .x)) On Mon, Apr 14, 2008 at 2:03 PM, Ryan Lauritsen <[EMAIL PROTECTED]> wrote: > Hi all. I'm brand new to R. > > My dataset (stored in MySQL) is a list of weather stations in rows by > year with various weather variables in columns,

[R] Need help on histogram

2008-04-14 Thread Smita Pakhale
Hi, I am trying to make a histogram with two x variables, can I do it in R. I have two variables which I need to graph as histograms with frequency on y axis (hopefully the two shown in different colors). I cannot seem to find how to do it in R, after reading the help section and some google stuf

[R] linear regression "group by"

2008-04-14 Thread Ryan Lauritsen
Hi all. I'm brand new to R. My dataset (stored in MySQL) is a list of weather stations in rows by year with various weather variables in columns, for example: STNID YEAR TEMP DEWP station11990 54 50 station11991 23 10 station11992 34 18 station21990

Re: [R] how to write a table to pdf

2008-04-14 Thread Henrique Dallazuanna
See textplot function in gplots package On Mon, Apr 14, 2008 at 1:09 PM, Ng Stanley <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a way to write a table to pdf ? I have checked write.table, it > only > writes to text file. > >[[alternative HTML version deleted]] > > __

Re: [R] Initialize many variables to NUL, check whether an object exist

2008-04-14 Thread Gabor Csardi
What is RG? I suspect it is not a list but a vector and you operation you wrote does not make sense. Convert it to a list if you want to store c("a","b") is RG[["AB"]]. G. On Tue, Apr 15, 2008 at 12:06:14AM +0800, Ng Stanley wrote: > Hi, > > How can I force the assignment ? > > > RG[["ABC"]]

[R] Logistic regression

2008-04-14 Thread Guillaume Brutel
Dear all, I am trying to fit a non linear regression model to time series data. If I do this: reg.logis = nls(myVar~SSlogis(myTime,Asym,xmid,scal)) I get this error message (translated to English from French): Erreur in nls(y ~ 1/(1 + exp((xmid - x)/scal)), data = xy, start = list(xmid = aux[1],

[R] how to write a table to pdf

2008-04-14 Thread Ng Stanley
Hi, Is there a way to write a table to pdf ? I have checked write.table, it only writes to text file. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] Initialize many variables to NUL, check whether an object exist

2008-04-14 Thread Ng Stanley
Hi, How can I force the assignment ? > RG[["ABC"]] <- c("a", "b") Error in RG[["ABC"]] <- c("a", "b") : more elements supplied than there are to replace On Mon, Apr 14, 2008 at 9:53 PM, Gabor Csardi <[EMAIL PROTECTED]> wrote: > On Mon, Apr 14, 2008 at 09:47:49PM +0800, Ng Stanley wrote: > >

Re: [R] Is this an artifact of using "which"?

2008-04-14 Thread Uwe Ligges
Tania Oh wrote: > Dear Uwe, > thank you very much for this. > After reading your solution below, I searched the help pages for > data.frame, which, factor but I didn't see the option for "drop" in them. In fact, ?factor links to ?[.factor whcih explains it. Uwe > I googled and found "drop"

Re: [R] getGraphicsEvent plotting two graph

2008-04-14 Thread Greg Snow
I think that the problem is with the dev.off commands. The first time running b there are not a device 2 and device 3 so dev.off does nothing (or if they did exist then they are turned off). Then you set the graphics event callback which attaches to the current graph window (number 3 in general).

Re: [R] Power curve for a wilcoxon test

2008-04-14 Thread Ben Bolker
Duncan Murdoch stats.uwo.ca> writes: > > On 4/14/2008 8:59 AM, Louisa Hay wrote: > > Hi, > > I am trying to write R code to produce a power curve to show how the power of a > > Wilcoxon-test varies depending on the mean, with data generated from a uniform distribution. Any ideas > how I shoul

Re: [R] What this message means? (spatstat)

2008-04-14 Thread Paul Hiemstra
CT YU wrote: > Hi all, > When I use the function envelope(???,pcf,i=???,j=???), there are some errors > as followings: > Error: cannot allocate vector of size 5.3 Mb > In addition: Warning messages: > 1: In vector("double", length) : > Reached total allocation of 502Mb: see help(memory.size) > 2:

Re: [R] Huber-white cluster s.e. after optim?

2008-04-14 Thread Peter Muhlberger
Hi Achim: Thanks for the reply! I did notice that robcov() requires the X & Y and also a scores vector and that these are not readily available under fixed names or at all in output from such functions as systemfit and optim. I wonder if it would make sense to have a stop-gap function that would

Re: [R] nonlinear curve fitting on a torus

2008-04-14 Thread Spencer Graves
Have you tried plotting it, e.g., like the following: npts = 51 # or some number h = seq(0, ???, length=npts) funh <- rep(NA, npts) for(i in 1:npts)funh[i] <- fun(h[i]) plot(h, funh) Hope this helps. Spencer Sungsu wrote: > > Dear Sp

Re: [R] Is this an artifact of using "which"?

2008-04-14 Thread Richard . Cotton
> > The (imho) unintuitive behaviour is to do with the subsetting function > > [.factor, not which. There are a couple of workarounds: > > > In that case, your intuition needs readjustment > > There are other systems which (de facto) drop unused levels by default, > and it is a real pain t

Re: [R] Using the Arial font in the plot function.

2008-04-14 Thread Prof Brian Ripley
You forgot to tell us your OS, so it was probably Windows. If it is Windows, Arial is the default font for the windows() family of devices, including png(). However, bitmapped plots don't have text or fonts, just pixels. As for postscript(), I am unaware of the existence of a PostScript font

[R] Using the Arial font in the plot function.

2008-04-14 Thread Todd Remund
I would like to ensure that all the text in my plot is in the arial font, like in excel and word. I have been saving my graphics to a file using the png() function, and have tried the postscript() function. In the documentation I have not been able to find a way of changing the family argumen

Re: [R] Power curve for a wilcoxon test

2008-04-14 Thread Duncan Murdoch
On 4/14/2008 8:59 AM, Louisa Hay wrote: > Hi, > I am trying to write R code to produce a power curve to show how the power of > a > Wilcoxon-test varies depending on the mean, with data generated from a > uniform distribution. Any ideas how I should go about this?Louisa I think I gave you enoug

Re: [R] Initialize many variables to NUL, check whether an object exist

2008-04-14 Thread Gabor Csardi
On Mon, Apr 14, 2008 at 09:47:49PM +0800, Ng Stanley wrote: > Hi, > > Two questions: > > A) I need to initialize many variables to NULL. So I created variable_names > <- c("a1", "a2"). What can I do to variable_names so that variable a1 is > NULL and a2 is NULL ? for (n in variable_names) assign

[R] Initialize many variables to NUL, check whether an object exist

2008-04-14 Thread Ng Stanley
Hi, Two questions: A) I need to initialize many variables to NULL. So I created variable_names <- c("a1", "a2"). What can I do to variable_names so that variable a1 is NULL and a2 is NULL ? B) How can I check whether an object exist ? Thanks Stanley [[alternative HTML version deleted]]

[R] Non-linearity with Parametric data

2008-04-14 Thread Charles Willis
Hello, I am trying to test for non-linearity in a set of non-parametric data. Furthermore, I would like to do so in a multi-variate model. Frankly, I don't even know if this is possible, and if it is possible, I don't know if it is implemented in an R package. Any advice would greatly appreciated.

[R] ctv, install.views, install.packages (& update.packages)

2008-04-14 Thread Vorlow Constantinos
Dear all, Wouldn't it be helpful if the install.views install.packages update.packages had a "downloadonly=TRUE" flag which would allow us to download the packages and install them later (or put them in a USB stick and take them for installation on anothe PC). I am behind a firewall (Bank)

[R] What this message means? (spatstat)

2008-04-14 Thread CT YU
Hi all, When I use the function envelope(???,pcf,i=???,j=???), there are some errors as followings: Error: cannot allocate vector of size 5.3 Mb In addition: Warning messages: 1: In vector("double", length) : Reached total allocation of 502Mb: see help(memory.size) 2: In vector("double", length)

Re: [R] Equivalent to a BY command in SAS

2008-04-14 Thread Michael Kubovy
You might also take a look at the doBy package. On Apr 14, 2008, at 7:30 AM, zerfetzen wrote: > Thanks all. I will try to use both tapply and by, and have no idea > how I > missed the by function. Thanks again. _ Professor Michael Kubovy University of Virginia Dep

Re: [R] Added Variable Plot for Cox Regression

2008-04-14 Thread Terry Therneau
It would be earier to respond to your query if there were a more complete reference than "Lindkvist 1999". I've looked at added variable plots, adjusted variable plots, and constructed variable plots for the Cox model many years ago. The ideas resulted in some papers, but in practical work

Re: [R] R equivalent of erfcinv in matlab

2008-04-14 Thread Prof Brian Ripley
Bill, We already have erf() and erfc() as examples, and help.search() will find them. I've added erfinv() and erfcinv() to the examples and concept index. I don't see a good reason to add them to e.g. the 'stats' namespace: it is not as if we wish to encourage people to use them instead of [p

Re: [R] nonlinear curve fitting on a torus

2008-04-14 Thread Sungsu
Dear Spencer. Thank you for your kind reply. I have n data points observed on the surface of a torus. I am trying to fit the geodesic line equation to these points on the surface: the equation is ‘u=h*integrate(((5+cos(v))*sqrt((5+cos(v))^2-h^2))^{-1}) from 0 to v’. I wrote the following R

Re: [R] Power curve for a wilcoxon test

2008-04-14 Thread Ben Bolker
Louisa Hay msn.com> writes: > > > Hi, > I am trying to write R code to produce a power curve to show > how the power of a > Wilcoxon-test varies depending on the mean, with data > generated from a uniform > distribution. Any ideas > how I should go about this?Louisa Here's a brute-force a

[R] Power curve for a wilcoxon test

2008-04-14 Thread Louisa Hay
Hi, I am trying to write R code to produce a power curve to show how the power of a Wilcoxon-test varies depending on the mean, with data generated from a uniform distribution. Any ideas how I should go about this?Louisa _ Amazing p

Re: [R] Is this an artifact of using "which"?

2008-04-14 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: >> I used "which" to obtain a subset of values from my data.frame. >> however, I find that there is a "trace" of the values I have removed. >> Any suggestions would be greatly appreciate. >> >> Below is my data: >> >> d <- data.frame( val = 1:10, >> gr

Re: [R] Associative array and How to store a set of objects ?

2008-04-14 Thread Gabor Csardi
On Mon, Apr 14, 2008 at 08:52:36PM +0800, Ng Stanley wrote: > Hi, > > Didn't make myself clear on A). The twenty OBs are all different, how to > store them in a vector or list ? bigOB <- list(OB1, OB2, OB3, ..., OB20) G. [...] -- Csardi Gabor <[EMAIL PROTECTED]>UNIL DGM _

Re: [R] Associative array and How to store a set of objects ?

2008-04-14 Thread Ng Stanley
Hi, Didn't make myself clear on A). The twenty OBs are all different, how to store them in a vector or list ? Your solution to B) is nice and clear. Will read up on the Introduction also. On Mon, Apr 14, 2008 at 8:39 PM, Gabor Csardi <[EMAIL PROTECTED]> wrote: > On Mon, Apr 14, 2008 at 08:32:55

Re: [R] Associative array and How to store a set of objects ?

2008-04-14 Thread Gabor Csardi
On Mon, Apr 14, 2008 at 08:32:55PM +0800, Ng Stanley wrote: > Hi, > > Two questions: > > A) Assuming OB is an object, how do I store 20 of OB in a vector or list ? replicate(20, OB, simplify=FALSE) > B) Does R has something similar associative array to Perl ? For example, > %our_friends = ('bes

[R] Associative array and How to store a set of objects ?

2008-04-14 Thread Ng Stanley
Hi, Two questions: A) Assuming OB is an object, how do I store 20 of OB in a vector or list ? B) Does R has something similar associative array to Perl ? For example, %our_friends = ('best', 'Don', 'good', 'Robert', 'worst', 'Joe'); $our_friends{'cool'} = "Karen"; Thanks Stanley [[alter

Re: [R] Equivalent to a BY command in SAS

2008-04-14 Thread Duncan Murdoch
On 4/14/2008 7:30 AM, zerfetzen wrote: > Thanks all. I will try to use both tapply and by, and have no idea how I > missed the by function. Thanks again. One problem with both of those arises if you are subsetting on several columns. They will do the calculations for all combinations of all c

Re: [R] Is this an artifact of using "which"?

2008-04-14 Thread Tania Oh
Dear Uwe, thank you very much for this. After reading your solution below, I searched the help pages for data.frame, which, factor but I didn't see the option for "drop" in them. I googled and found "drop" associated with the function subset. is this the help page you were alluding to? Sor

Re: [R] Is this an artifact of using "which"?

2008-04-14 Thread Richard . Cotton
> I used "which" to obtain a subset of values from my data.frame. > however, I find that there is a "trace" of the values I have removed. > Any suggestions would be greatly appreciate. > > Below is my data: > > d <- data.frame( val = 1:10, > group = sample(LETTERS[1:5], 10,

Re: [R] Huber-white cluster s.e. after optim?

2008-04-14 Thread Achim Zeileis
On Thu, 10 Apr 2008, Peter Muhlberger wrote: > Hi Bill: Thanks for the reply! As you've no doubt guessed, I'm not a > statistician (I'm a social scientist). I hadn't given thought to > modeling the cluster-based covariance explicitly--interesting > possibility. My responses are drawn from s

Re: [R] Is this an artifact of using "which"?

2008-04-14 Thread Uwe Ligges
Tania Oh wrote: > Dear all, > > I used "which" to obtain a subset of values from my data.frame. > however, I find that there is a "trace" of the values I have removed. > Any suggestions would be greatly appreciate. > > Below is my data: > > d <- data.frame( val = 1:10, >

Re: [R] Equivalent to a BY command in SAS

2008-04-14 Thread zerfetzen
Thanks all. I will try to use both tapply and by, and have no idea how I missed the by function. Thanks again. -- View this message in context: http://www.nabble.com/Equivalent-to-a-BY-command-in-SAS-tp16670452p16676280.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Merging daily and weekly data

2008-04-14 Thread Edwin Sendjaja
Hi Oystein, Maybe this is what you are looking for: Keyword: merge() -- table1<-read.table("daily.data") table2<-read.table("weekly.data") (maybe you need to create a new common coloumn for daily and weekly data set. For

Re: [R] Format regression result summary

2008-04-14 Thread Tom Chr Backer Johnsen
Thiemo Fetzer wrote: As a general rule and practical in many contexts uses the following steps: (a) Use the R2HTML library to write the results from the summary to the clipboard (b) Open a spreadsheet and paste the results there. (c) Edit and shove things around until everything are where you w

[R] Is this an artifact of using "which"?

2008-04-14 Thread Tania Oh
Dear all, I used "which" to obtain a subset of values from my data.frame. however, I find that there is a "trace" of the values I have removed. Any suggestions would be greatly appreciate. Below is my data: d <- data.frame( val = 1:10, group = sample(LETTERS[1:5], 10, rep

Re: [R] Merging daily and weekly data

2008-04-14 Thread Gabor Grothendieck
.45 > 20080410200815 27.45 > 20080411200815 27.45 > > library(zoo) > library(xts) > > Lines.daily <- "quote_date value + 200804071 + 200804082 + 200804093 + 200804104 + 200804116 + 20080412

Re: [R] Power curves

2008-04-14 Thread Chuck Cleland
On 4/14/2008 6:35 AM, Chuck Cleland wrote: > On 4/14/2008 6:21 AM, Louisa Hay wrote: >> >> Hi, >> I am trying to create a power curve to show how the power of a t-test varies >> depending on the mean. Any ideas how I should go about this? >> Louisa > >Something like this maybe? > > mydiffs

Re: [R] Power curves

2008-04-14 Thread Chuck Cleland
On 4/14/2008 6:21 AM, Louisa Hay wrote: > > Hi, > I am trying to create a power curve to show how the power of a t-test varies > depending on the mean. Any ideas how I should go about this? > Louisa Something like this maybe? mydiffs <- seq(.05,1,.05) mypower <- vector("numeric", 20) for(

Re: [R] Power curves

2008-04-14 Thread Duncan Murdoch
Louisa Hay wrote: > > Hi, > I am trying to create a power curve to show how the power of a t-test varies > depending on the mean. Any ideas how I should go about this? > Louisa The pt() function supports a non-centrality parameter, so you can do this calculation directly. For other situations

Re: [R] Merging daily and weekly data

2008-04-14 Thread jim holtman
Here is one way to get the 'week': > x <- as.character(seq(20080401, 20080430)) > # get the week > cbind(x, format(as.Date(x, "%Y%m%d"), "%W")) x [1,] "20080401" "13" [2,] "20080402" "13" [3,] "20080403" "13" [4,] "20080404" "13" [5,] "20080405" "13" [6,] "20080406" "13" [7,] "2008040

[R] Power curves

2008-04-14 Thread Louisa Hay
Hi, I am trying to create a power curve to show how the power of a t-test varies depending on the mean. Any ideas how I should go about this? Louisa _ [[alternative HTML version deleted]]

[R] Merging daily and weekly data

2008-04-14 Thread Øystein Myrland
Dear R-help group, I have a dataset with daily closing prices from a stock exchange (consecutive 5 trading days) from a firm trading a specific commodity. The date variable looks like: quote_date 20080411 With the format; mmdd. Moreover, I have another data set with a (average) weekly pri

Re: [R] looping problem

2008-04-14 Thread Richard . Cotton
> I would like to do looping for this process below to estimate alpha > beta from gamma distribution: > Here are my data: > day_data1 <- > 123456 789 10 11 12 > 13 14 15 16 17 18 19 20 21 22 23 > 1943 48.3 18.5 0.0 0.0 18.3 0.0