Re: [R] nlsList{nlme} control of min and max parameter bounds?

2010-04-15 Thread Dieter Menne
.. and do not forget that the real power comes from using nlme after nlsList; i.e. on the result of nlsList, even if some did not converge! The effect of taming outliers can be amazing. See Pinheiro/Bates or http://www.menne-biomed.de/gastempt/index.html Dieter From: Steve Oswald

Re: [R] Odp: fitting a quadratic function - poly?

2010-04-15 Thread Petr PIKAL
Hi Bert Gunter gunter.ber...@gene.com napsal dne 14.04.2010 18:54:37: Petr Pikal wrote: ... I mean that you can use fit- lm(y~x+I(x^2)) coef(fit)[1] + coef(fit)[2]*x + coef(fit)[3]*x^2 but you can not use fit- lm(y~poly(x,2)) coef(fit)[1] + coef(fit)[2]*x + coef(fit)[3]*x^2

Re: [R] envelope in spatstat

2010-04-15 Thread Turner Rolf
Comments in-ine below. Tom Richardson wrote: Hi R users, This query is regarding the use of the 'envelope' function in Spatstat. My data can be represented as a point process with CONTINUOUS marks: points - ppp(x=x,y=y, marks=m, window= wind) However the marks are alignments (lines), and so

[R] grofit

2010-04-15 Thread alexander russell
Hello, I would like to ask about the statistic used for initial values for models built with grofit. Is the mean (of the experiments or cases) at t1 used? Also at the other time points? regards, Russell [[alternative HTML version deleted]] __

[R] Question about R mode

2010-04-15 Thread djackson
Hello all, I am using R to perform certain calculations on huge amounts of data. In short I need a function that does the mode function, ie returns the most common element. I looked at the mode function in R but it seems to return the type of the data element you give it. Does such a

[R] Efficient algorithm to get a solution path for ridge regression?

2010-04-15 Thread Kenneth Lo
With the use of the LARS algorithm, a path of solutions corresponding to a sequence of the regularization parameter can be obtained for LASSO (or even the elastic net, a hybrid between LASSO and ridge) at the cost of one linear regression. In terms of computational speed LASSO seems to

[R] Automating searching text for key words

2010-04-15 Thread LCOG1
Hello all, Im doing some content analysis of news stories and i am looking for a way to sort through different text lists searching for specified words then storing the results, at this point just the count. Heres what i have so far: #Load data frame of wed address to load -Creates raw

Re: [R] histogram

2010-04-15 Thread Paul Hiemstra
Santosh wrote: Dear R gurus... How do I control smoothing of a density plot in panel.densityplot when using histogram? Thanks much, Santosh [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] R interactive input like C++

2010-04-15 Thread Paul Hiemstra
余舟 wrote: Huhu, Thank you for all you guys. readline works. I hope R can be more and more powerful to deal with strings. Strings and power come from regular expressions, check out ?regexpr. cheers, Paul Thank you so much; Zhou 2010/4/14 Erik Iverson er...@ccbr.umn.edu David Scott

[R] sum rows in a data.frame

2010-04-15 Thread arnaud Gaboury
Dear group, Here is a data.frame, lme: lme DESCRIPTION CLOSING.PRICE POSITION 4PRIMARY NICKEL USD 04/06/1025,755.71000 5PRIMARY NICKEL USD 10/06/1025,760.86000 6 PRM HGH GD ALUMINIUM USD 09/07/10 2,415.90000 8 SPCL

Re: [R] Question about R mode

2010-04-15 Thread Paul Hiemstra
djack...@miners.utep.edu wrote: Hello all, I am using R to perform certain calculations on huge amounts of data. In short I need a function that does the mode function, ie returns the most common element. I looked at the mode function in R but it seems to return the type of the data

[R] Consistent behaviour of for-loop

2010-04-15 Thread Uwe Dippel
First my excuses if I keep bugging everyone in this list, but I am a newbie, and tend to find some behaviour that looks unexpected to me; and I would really appreciate to be pointed to some location that allows me to understand more about this software. Here is my next question:

Re: [R] Question about R mode

2010-04-15 Thread Patrick Burns
On 15/04/2010 08:52, Paul Hiemstra wrote: djack...@miners.utep.edu wrote: Hello all, I am using R to perform certain calculations on huge amounts of data. In short I need a function that does the mode function, ie returns the most common element. I looked at the mode function in R but it seems

Re: [R] Ranking correlation with R

2010-04-15 Thread Peter Ehlers
On 2010-04-14 16:04, David Nemer wrote: Hello Guys, thank you all very much for the help! Sorry for my total lack of knowledge in R... so I did the correlation.. and got these results: cor(A, C, method = spearman) [1] 0.4922165 cor(B, C, method = spearman) [1] 0.1922412 cor(A, B, method =

Re: [R] envelope in spatstat

2010-04-15 Thread Adrian Baddeley
Tom Richardson wrote: This query is regarding the use of the 'envelope' function in Spatstat. For queries about a contributed package, please contact the package author. My data can be represented as a point process with CONTINUOUS marks: points - ppp(x=x,y=y, marks=m, window= wind)

Re: [R] GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?

2010-04-15 Thread JANSEN, Ivy
I was not sure whether using the smoother as presented would give exactly the same result as using two linear terms and 2 smoothers, and wanted to check this. Regards, Ivy -Oorspronkelijk bericht- Van: Gavin Simpson [mailto:gavin.simp...@ucl.ac.uk] Verzonden: woensdag 14 april 2010

Re: [R] graphic question

2010-04-15 Thread Peter Ehlers
On 2010-04-14 19:57, Tighiouart, Hocine wrote: Hello, I have a simple question that I could not really figure out. I am plotting labels within a graph using the text function. I first plot the first label by specifying the x and y coordinates on the graph. Then to plot the second label next

Re: [R] env() for lme4

2010-04-15 Thread pnouvellet
Thanks a lot Rob! sorry, yesterday, i misunderstood your post... the call to 'profile(fm...@env)' worked perfectly! it is really nice to see it working smoothly!! pierre -- View this message in context: http://n4.nabble.com/env-for-lme4-tp1565045p1871149.html Sent from the R help mailing

[R] Any GARCH-in-mean Implementation?

2010-04-15 Thread Vehbi Sinan Tunalioglu
Dear All, Is there any GARCH-M implementation in R? I checked tseries and fGarch packages and could not find yet. Thanks in advance and Kind Regards, Vehbi Sinan signature.asc Description: OpenPGP digital signature __ R-help@r-project.org mailing

[R] Exporting an rgl graph

2010-04-15 Thread cgenolin
Hi the list, I use rgl to produce a 3D graph. I would like to show this graph to some collaborator. Is there a way to save it and send it to someone else? Christophe Genolini __ R-help@r-project.org mailing list

[R] sum rows in a data.frame...solution

2010-04-15 Thread arnaud Gaboury
Found this solution. It is maybe not the most elegant way, but it does the job. a=as.data.frame(substr(lme$DESCRIPTION,1,14)) colnames(a)=c(DESCRIPTION) lme=as.data.frame(c(a,lme[,2:3])) lme DESCRIPTION CLOSING.PRICE POSITION 1 PRIMARY NICKEL 25,755.71000 2

Re: [R] histogram

2010-04-15 Thread Santosh
Thanks for your email... yes, I had tried that bw thing.. for some reason it does not seem to work.. could not figure out where I am wrong... Below is an example for your convenience.. you might notice that the density plots appear to be a curve of connected segments. Changing breaks, nint or bw

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Peter Ehlers
On 2010-04-15 2:10, Uwe Dippel wrote: First my excuses if I keep bugging everyone in this list, but I am a newbie, and tend to find some behaviour that looks unexpected to me; and I would really appreciate to be pointed to some location that allows me to understand more about this software. Here

Re: [R] how to draw multiple vertical bands

2010-04-15 Thread Jim Lemon
On 04/15/2010 12:36 AM, senne wrote: hi R gurus I saw some graphs with vertical band like this one: http://pragcap.com/wp-content/uploads/2010/04/GS.png how to draw the blue band in R, can't find any clue to do this,any ideas? Hi senne, The rect function in base graphics can do the job.

Re: [R] Exporting an rgl graph

2010-04-15 Thread Barry Rowlingson
On Thu, Apr 15, 2010 at 10:24 AM, cgeno...@u-paris10.fr wrote: Hi the list, I use rgl to produce a 3D graph. I would like to show this graph to some collaborator. Is there a way to save it and send it to someone else? See ?rgl.postscript and ?rgl.snapshot Or use some kind of screen capture

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Uwe Dippel
Peter Ehlers wrote: par(mfrow=c(1,1)) qqnorm(rnorm(20)) qqmath(rnorm(20)) par(mfrow=c(3,4)) for(i in 1:12)qqnorm(rnorm(20)) Until here everything works as expected, and the last line prints 12 samples of qqnorm. However, for(i in 1:12)qqmath(rnorm(20)) is doing nothing at all.

Re: [R] histogram

2010-04-15 Thread Paul Hiemstra
Santosh wrote: Thanks for your email... yes, I had tried that bw thing.. for some reason it does not seem to work.. could not figure out where I am wrong... Below is an example for your convenience.. you might notice that the density plots appear to be a curve of connected segments. Changing

Re: [R] histogram

2010-04-15 Thread Peter Ehlers
On 2010-04-15 3:35, Santosh wrote: Thanks for your email... yes, I had tried that bw thing.. for some reason it does not seem to work.. could not figure out where I am wrong... Below is an example for your convenience.. you might notice that the density plots appear to be a curve of connected

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Peter Ehlers
On 2010-04-15 4:03, Uwe Dippel wrote: Peter Ehlers wrote: par(mfrow=c(1,1)) qqnorm(rnorm(20)) qqmath(rnorm(20)) par(mfrow=c(3,4)) for(i in 1:12)qqnorm(rnorm(20)) Until here everything works as expected, and the last line prints 12 samples of qqnorm. However, for(i in

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Uwe Dippel
Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use the 'layout' argument to select the number of columns/rows. This is easiest if you set up a conditioning variable: cond - gl(12, 20, labels = letters[1:12]) x -

Re: [R] classes and functions for qqnorm and stem

2010-04-15 Thread Peter Ehlers
On 2010-04-14 21:20, Uwe Dippel wrote: Referring to Using R for Data Analysis and Graphics by J H Maindonald, and available from the R site, I found the example on p.30 non-working: stem(qqnorm(possum$hdlngth)) Error in stem(qqnorm(possum$hdlngth)) : 'x' must be numeric Since

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Peter Ehlers
On 2010-04-15 5:00, Uwe Dippel wrote: Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use the 'layout' argument to select the number of columns/rows. This is easiest if you set up a conditioning variable: cond -

Re: [R] Exporting an rgl graph

2010-04-15 Thread Ted Harding
On 15-Apr-10 10:10:54, Barry Rowlingson wrote: On Thu, Apr 15, 2010 at 10:24 AM, cgeno...@u-paris10.fr wrote: Hi the list, I use rgl to produce a 3D graph. I would like to show this graph to some collaborator. Is there a way to save it and send it to someone else? See ?rgl.postscript and

Re: [R] graphic question

2010-04-15 Thread Tighiouart, Hocine
Thanks Peter. This worked fine. I guess my problem was that when I maximize the graph window everything seems to expand, this is why I was having trouble with it. -Original Message- From: Peter Ehlers [mailto:ehl...@ucalgary.ca] Sent: Thursday, April 15, 2010 4:54 AM To: Tighiouart,

Re: [R] Consistent behaviour of for-loop

2010-04-15 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 15.04.2010 13:00:57: Peter Ehlers wrote: You are mixing 'traditional' graphics (par(...)) and 'lattice' graphics. That won't work. In lattice, you use the 'layout' argument to select the number of columns/rows. This is easiest if you set up a

Re: [R] R package documentation

2010-04-15 Thread Sébastien Bihorel
Thanks David, After a bit of research, I believe that I've found the post you are referring to: http://tolstoy.newcastle.edu.au/R/e9/help/10/03/8779.html I will look into the proposed solutions. Sebastien On Wed, Apr 14, 2010 at 6:01 PM, David Scott d.sc...@auckland.ac.nz wrote: Sébastien

Re: [R] Exporting an rgl graph

2010-04-15 Thread cgenolin
Thanks for you answer. Let me precise my question. In fact, I do not want to capture a screen, I want to save an object that can be seen in 3D. With rgl, using my mouse, I can make the object move. This is what I want to export: an real 3D object that my collaborator will have the possibility

[R] debian lenny R GUI instalation problems

2010-04-15 Thread baxy77
hi, i have a problem installing any type of GUI interface on my debian lenny 64x OS, can anybody spare some time to help me?. so i have installed the R by apt-get and then in R used command : baxy:~# update-alternatives --config java There are 3 alternatives which provide `java'.

Re: [R] Exporting an rgl graph

2010-04-15 Thread Barry Rowlingson
On Thu, Apr 15, 2010 at 1:01 PM, cgeno...@u-paris10.fr wrote: Thanks for you answer. Let me precise my question. In fact, I do not want to capture a screen, I want to save an object that can be seen in 3D. With rgl, using my mouse, I can make the object move. This is what I want to export:

Re: [R] Non-parametric Tests for location in R

2010-04-15 Thread David Winsemius
On Apr 14, 2010, at 7:19 PM, maithili davda wrote: How do I do the sign test and the sign rank test that SAS gives as an output in proc univariate in R? sign.test and wilcox.test do not give the same output. No data, no specifics, no code. Rather difficult to determine whether you made

Re: [R] predict.lm with NAs

2010-04-15 Thread Walmes Zeviani
You can use predict() by specifying a complete data.frame() for prediction to the argument newdata=. Look: da - expand.grid(x1=LETTERS[1:4], x2=1:9) da$y - rnorm(da$x1) da$y[sample(length(da$y), 5)] - NA m0 - lm(y~x1+x2, data=da) predict(m0) # NA not predicted predict(m0, newdata=da) # NA

Re: [R] sequence clustering and assembly

2010-04-15 Thread David Winsemius
On Apr 14, 2010, at 11:19 PM, Bogdan Tanasa wrote: Dear all, please could you suggest any R functions or packages (or external programs), that a. take as input a large number ( 10 000) of short 20-30 nt sequences, and do sequence assembly, to reconstruct larger (extended) 30-50

Re: [R] Regression w/ interactions

2010-04-15 Thread Frank E Harrell Jr
Michael Dykes wrote: I have a project due in my Linear Regression class re: regression on a data set my professor gave us a hint that there were *exactly *2 sig interactions. The data set is attached. We have to find which predictors are significant, which 2 interactions are sig. Also, I nedd

Re: [R] sequence clustering and assembly

2010-04-15 Thread Martin Morgan
Hi Bogdan -- On 04/14/2010 08:19 PM, Bogdan Tanasa wrote: Dear all, please could you suggest any R functions or packages (or external programs), that likely you'll have more luck on the Bioconductor mailing list, http://bioconductor.org/docs/mailList.html but... a. take as input a large

Re: [R] Exporting an rgl graph

2010-04-15 Thread baptiste auguie
I have seen pdf files with 3D objects embedded in it, using the U3D format, http://en.wikipedia.org/wiki/Universal_3D but I don't think there's a device for this in R; in fact there may not even exist a third-party post-processing route available at this time to bridge the gap between rgl and

[R] sum() returns 0 not NA

2010-04-15 Thread Wilmar Igl
Dear all, just a stupid R question, since the results puzzle me a bit: sum(c(NA,NA), na.rm=TRUE) [1] 0 NA + NA [1] NA NA + 1 [1] NA Why does sum(c(NA,NA), na.rm=TRUE) return 0 and not NA? Thanks in advance, Will __ R-help@r-project.org

Re: [R] Exporting an rgl graph

2010-04-15 Thread Ted Harding
On 15-Apr-10 12:33:11, baptiste auguie wrote: I have seen pdf files with 3D objects embedded in it, using the U3D format, http://en.wikipedia.org/wiki/Universal_3D At the bottom of that page is a link to a very nice example: http://meshlab.sourceforge.net/wiki/images/c/cc/Laurana.pdf

Re: [R] sum rows in a data.frame

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 3:50 AM, arnaud Gaboury wrote: Dear group, Here is a data.frame, lme: lme DESCRIPTION CLOSING.PRICE POSITION 4PRIMARY NICKEL USD 04/06/1025,755.71000 5PRIMARY NICKEL USD 10/06/1025,760.86000 6 PRM HGH GD

Re: [R] sum rows in a data.frame...solution

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 5:33 AM, arnaud Gaboury wrote: Found this solution. It is maybe not the most elegant way, but it does the job. a=as.data.frame(substr(lme$DESCRIPTION,1,14)) colnames(a)=c(DESCRIPTION) lme=as.data.frame(c(a,lme[,2:3])) lme DESCRIPTION CLOSING.PRICE POSITION

Re: [R] sum() returns 0 not NA

2010-04-15 Thread Ted Harding
On 15-Apr-10 12:37:42, Wilmar Igl wrote: Dear all, just a stupid R question, since the results puzzle me a bit: sum(c(NA,NA), na.rm=TRUE) [1] 0 NA + NA [1] NA NA + 1 [1] NA Why does sum(c(NA,NA), na.rm=TRUE) return 0 and not NA? Thanks in advance, Will For the same

[R] [announce] yeroon.net/ggplot2 web application v0.2

2010-04-15 Thread Jeroen Ooms
A new version of the ggplot2 web interface has been released. Info and a demo video are available here: http://www.stat.ucla.edu/~jeroen/ggplot2/. The new version has a lot of new features, like advanced data import, integration with Google docs, converting variables from numeric to factor to

Re: [R] sum() returns 0 not NA

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 8:37 AM, Wilmar Igl wrote: Dear all, just a stupid R question, since the results puzzle me a bit: sum(c(NA,NA), na.rm=TRUE) [1] 0 NA + NA [1] NA NA + 1 [1] NA Why does sum(c(NA,NA), na.rm=TRUE) return 0 and not NA? sum(c()) [1] 0 ?sum NB: the sum of an

[R] Weighted Spearman Correlation with significance test

2010-04-15 Thread Антон Морковин
Hi all, does anybody know a useful function in R to calculate Weighted Spearman Correlation with p-values, particularly for matrices? Thanks, A. Morkovin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Alignment of x-axis labels

2010-04-15 Thread Steve Murray
Dear all, I'm having trouble getting the correct spacing between x-axis labels on a barplot. This is the command I'm using to generate the plot: temp - barplot(precip, beside=TRUE, xaxt=n, las=1, xpd=FALSE, col=grey28, ylim=c(0, max(precip))) Here is the structure of temp: str(temp)  num

Re: [R] curve

2010-04-15 Thread Duncan Murdoch
On 14/04/2010 4:59 PM, Dwayne Blind wrote: Dear R users, How can I use curve with a function of two variables ? See Ben Bolker's reply if you want to plot a surface. If you want to plot a curve by holding one of the two variables fixed, just set it to a constant value, and use x as the

Re: [R] sum specific rows in a data frame

2010-04-15 Thread hadley wickham
On Thu, Apr 15, 2010 at 1:16 AM, Chuck vijay.n...@gmail.com wrote: Depending on the size of the dataframe and the operations you are trying to perform, aggregate or ddply may be better.  In the function below, df has the same structure as your dataframe. Current version of plyr: agg

Re: [R] R CMD REMOVE etc. query

2010-04-15 Thread Prof. John C Nash
I've been working on a fairly complex package that is a wrapper for several optimization routines. In this work, I've attempted to do the following: - edit the package code foo.R - in a root terminal at the right directory location R CMD REMOVE foo R CMD INSTALL foo However,

Re: [R] sum specific rows in a data frame

2010-04-15 Thread Jeff Newmiler
This is good news, although I have recently encountered what I consider excessive memory usage in the addition of key columns that don't affect the number of groups. For example, grouping by Year and Month, if I add MonthBegin, a POSIXct column from which the Year and Month columns were

[R] Add header line to large text file

2010-04-15 Thread Zev Ross
All, I have a 30 million record text file without header information. I would like to add a header to this file without reading it first. Is this possible? The code below does what I want except that the readLines portion takes quite a long time. Is there a way around reading the lines? I'm

Re: [R] sum specific rows in a data frame

2010-04-15 Thread hadley wickham
I think the development version also fixes that problem, but it's hard to know without a reproducible example Hadley On Thu, Apr 15, 2010 at 2:33 PM, Jeff Newmiler jdnew...@dcn.davis.ca.us wrote: This is good news, although I have recently encountered what I consider excessive memory

Re: [R] sum specific rows in a data frame

2010-04-15 Thread hadley wickham
The problem is that the new version of plyr is incompatible with ggplot2, so I need to make some changes there before I can release it. Hopefully this summer. Hadley On Thu, Apr 15, 2010 at 1:33 PM, Vijay Nori vijay.n...@gmail.com wrote: This is very cool...thanks Hadley. When are you planning

[R] Help with TukeyHSD

2010-04-15 Thread Amit Patel
Hi I am conducting ANOVA using the aov function I am also conducting TukeyHSD to obtain which of the groups show variance How can I obtain the first three p values from the list below? zzz.aov - aov(Intensity ~ Group, data = zzzanova) TukeyHSD(zzz.aov) Tukey multiple comparisons of means

Re: [R] Selecting derivative order penalty for thin plate spline regression (GAM - mgcv)

2010-04-15 Thread Simon Wood
Christos, I would base choise of `m' on the AIC or GCV scores, (or on the REML or Marginal likelihood scores, if these have been used for smoothness selection). I don't think the m=2 basis will be strictly nested within the m=3 basis will it? So that rules out you option a. Option b is poor

[R] Connecting to Rserve remotely

2010-04-15 Thread Nupur Gupta
Hi All, I am having problems connecting to Rserve remotely. I am trying to connect to Rserve which is running on a developer machine. At the developer machine, I have created a file C:\Program Files\R\R-2.7.1\etc\Rserve.conf with a single line remote enable At this machine, I check the IP

Re: [R] Add header line to large text file

2010-04-15 Thread jim holtman
If you want to place the header at the beginning of the file, then you have to read/write the entire file to get that first line in. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross z...@zevross.com wrote: All, I have a 30 million record text file without header information. I would like to add a

Re: [R] Add header line to large text file

2010-04-15 Thread jim holtman
You also might take a look at using file.append to speed up the process. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross z...@zevross.com wrote: All, I have a 30 million record text file without header information. I would like to add a header to this file without reading it first. Is this

Re: [R] Add header line to large text file

2010-04-15 Thread Wensui Liu
if i were you, i probably will use 1 line of sed to do such task instead of R to insert headers in the file. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross z...@zevross.com wrote: All, I have a 30 million record text file without header information. I would like to add a header to this file

Re: [R] Problems getting symbols() to show table data

2010-04-15 Thread Guy Green
Thanks, balloonplot() is great and gets me really close to what I am after. However it then brings me to a slightly different problem - I wonder if anyone can suggest where I am going wrong? Again with simplified data ( http://n4.nabble.com/file/n1890724/test-data.txt test-data.txt ):

[R] step size truncated out of bounds

2010-04-15 Thread Judith Trunschke
Dear helpers, in course of my master thesis I trie to program a GLM to model the number of seeds produced per flower relates to the time they were exposed to pollinators (categorical with two levels), the altitude of population (categorical with two levels) and the species (categorical

Re: [R] search and replace

2010-04-15 Thread Vijay Nori
Dennis -- it does! However, how can a more generic situation be handled where South,North,East,West are replaced by x2,d6,qqw,mQ respectively? Thanks. On Wed, Apr 14, 2010 at 11:41 PM, Dennis Murphy djmu...@gmail.com wrote: Hi: Does this work for you? [[alternative HTML version

Re: [R] sum specific rows in a data frame

2010-04-15 Thread Vijay Nori
This is very cool...thanks Hadley. When are you planning to release that version? On Thu, Apr 15, 2010 at 9:09 AM, hadley wickham h.wick...@gmail.com wrote: On Thu, Apr 15, 2010 at 1:16 AM, Chuck vijay.n...@gmail.com wrote: Depending on the size of the dataframe and the operations you are

Re: [R] Gaussian Quadrature Numerical Integration In R

2010-04-15 Thread Ines Azaiez
Hi Ravi, Thanks for your response. I already considered the change of variables but I was wondering if there were already a function in R which do the same thing in an optimized way. My function f(x) is complicated so adding a change of variable makes the algorithm takes a lot of time to give

[R] using nls for gamma distribution (a,b,d)

2010-04-15 Thread Asif Wazir
Dear all i want to estimated the parameter of the gamma density(a,b,d) f(x) = (1/gamma(b)*(a^b)) * ((x-d)^(b-1)) * exp{-(x-d)/a)} for xd f(x) = Age specific fertility rate x = age when i run this in R by usling nls() gamma.asfr - formula(asfr ~ (((age-d)^(b-1))/((gamma(b))*(a^b)))*

[R] can't find daphnia.txt and others while working through Crawley's R-Book

2010-04-15 Thread David Hardie
I have a feeling that this is an embarassingly simple fix, but I've been at it for most of the morning and can't get things figured out. I'm trying to work through some examples in Crawley's The R Book. I have installed packages and libraries as described in the book, but when I try, for

Re: [R] Efficient algorithm to get a solution path for ridge regression?

2010-04-15 Thread Charles C. Berry
On Wed, 14 Apr 2010, Kenneth Lo wrote: With the use of the LARS algorithm, a path of solutions corresponding to a sequence of the regularization parameter can be obtained for LASSO (or even the elastic net, a hybrid between LASSO and ridge) at the cost of one linear regression. In terms of

[R] Poblems wih EBImage

2010-04-15 Thread R Heberto Ghezzo, Dr
Hello, Working with Windows 7 in a HP laptop with R-2.10.1 I download and installed ImageMagick-6.3.7.7-Q16-Windows-dll.exe and GTK 2.12.9-win32-2, then downloaded and installed from local file EBImage_3.2.0.zip and I got: library(EBImage) Loading required package: abind Error in inDL(x,

Re: [R] Help with TukeyHSD

2010-04-15 Thread eugen pircalabelu
Hi, Is this what you want? ?TukeyHSD summary(fm1 - aov(breaks ~ wool + tension, data = warpbreaks)) tk.fm1-TukeyHSD(fm1, tension, ordered = TRUE) tk.fm1 (tk.fm1[[1]][,4]) Eugen Pircalabelu (0032)471 842 140 (0040)727 839 293 - Original Message From: Amit Patel

Re: [R] Gaussian Quadrature Numerical Integration In R

2010-04-15 Thread Ravi Varadhan
Here is an example showing how to use variable transformation: k - 5 myfn - function(x, k) exp(-k * x^2) # this is the integrand over (-Inf, +Inf) # Integration using `integrate' function ans1 - integrate(myfn, lower=-Inf, upper=Inf, k=k)$val # Now we

Re: [R] Alignment of x-axis labels

2010-04-15 Thread Peter Ehlers
On 2010-04-15 7:23, Steve Murray wrote: Dear all, I'm having trouble getting the correct spacing between x-axis labels on a barplot. This is the command I'm using to generate the plot: temp- barplot(precip, beside=TRUE, xaxt=n, las=1, xpd=FALSE, col=grey28, ylim=c(0, max(precip))) Here is

[R] Problem with ONE of the Special German Characters

2010-04-15 Thread Michael Stegh
Dear List, I have data which contain the special German characters ä, ö, ü etc. After reading the text files into R those characters are displayed strangely, e. g. ä is ä. The first step is to replace those with their typical transcription, e. g. ä becomes ae by using the gsub command.

Re: [R] can't find daphnia.txt and others while working through Crawley's R-Book

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 11:42 AM, David Hardie wrote: I have a feeling that this is an embarassingly simple fix, but I've been at it for most of the morning and can't get things figured out. I'm trying to work through some examples in Crawley's The R Book. I have installed packages and

Re: [R] can't find daphnia.txt and others while working through Crawley's R-Book

2010-04-15 Thread David Hardie
Thanks David, but I have searched my hard drive using the search utility in Windows (not just c:\temp - the whole drive) for the file in question and it is not there. I have also used: data() to see the names of all dataframes in the datasets package as well as:

Re: [R] Exporting an rgl graph

2010-04-15 Thread luke
The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files supporting JCGS articles. The online supplements to the editorial include examples. The 3D examples related to the misc3d

Re: [R] Add header line to large text file

2010-04-15 Thread Zev Ross
Thanks to Wensui Liu and Jim Holtman for responses. Using sed was a good, quick (non-R) suggestion. Thanks! Zev Wensui Liu wrote: if i were you, i probably will use 1 line of sed to do such task instead of R to insert headers in the file. On Thu, Apr 15, 2010 at 10:34 AM, Zev Ross

Re: [R] Regression w/ interactions

2010-04-15 Thread Frank E Harrell Jr
Michael Dykes wrote: So, am i wrong to /assume /that the reasons my professor is asking us to find a high R^2 adjusted R^2, low Cp (near what p+1, if i remember correctly), low PRESS, AIC is b/c the data is randomly generated (b/c he has stated that all of the data for *all *of these hw

Re: [R] can't find daphnia.txt and others while working through Crawley's R-Book

2010-04-15 Thread Christian Raschke
The files associated with the book can be found on the author's website here: http://www.bio.ic.ac.uk/research/mjcraw/therbook/index.htm http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/ Just download what you need and put the files somewhere where you can find them. HTH, Christian

Re: [R] using nls for gamma distribution (a,b,d)

2010-04-15 Thread Peter Ehlers
I don't know what else is wrong, but do you really want a shape parameter equal to 28? gamma(28) is about 10^28. That's not a model I would trust. -Peter Ehlers On 2010-04-15 9:37, Asif Wazir wrote: Dear all i want to estimated the parameter of the gamma density(a,b,d) f(x) =

Re: [R] Exporting an rgl graph

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 12:34 PM, l...@stat.uiowa.edu wrote: The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1 ) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files supporting JCGS articles. The online supplements to the editorial

Re: [R] can't find daphnia.txt and others while working through Crawley's R-Book

2010-04-15 Thread David Winsemius
On Apr 15, 2010, at 12:34 PM, David Hardie wrote: Thanks David, but I have searched my hard drive using the search utility in Windows (not just c:\temp - the whole drive) for the file in question and it is not there. I have also used: data() to see the names of all dataframes in the

[R] Unwanted boxes in legend

2010-04-15 Thread Steve Murray
Dear all, I am using the following code to generate a legend in my plot (consisting of both bars and points), but end up with boxes around my points: legend(10, par(usr)[4], c(A, B, C, D), fill=c(NA,NA, grey28, NA), pch=c(16,4,NA,18), col=c(red,blue,grey28,yellow), lty=FALSE, bty=n,

Re: [R] using nls for gamma distribution (a,b,d)

2010-04-15 Thread Walmes Zeviani
I never had seen someone using a density function for a mean function in nonlinear regression. The convergence problem observed can be due the model derivatives respect to the parameters. How could computationally be d.gamma/d.alpha? digamma function? Does R understand this? If your phenomena

Re: [R] Problem with ONE of the Special German Characters

2010-04-15 Thread Duncan Murdoch
On 15/04/2010 12:22 PM, Michael Stegh wrote: Dear List, I have data which contain the special German characters ä, ö, ü etc. After reading the text files into R those characters are displayed strangely, e. g. ä is ä. The first step is to replace those with their typical transcription, e. g.

[R] fixed portion of lme4 model in newdata

2010-04-15 Thread Jacob Wegelin
Suppose we have • An lmer{lme4} model, MyModel, computed on dataframe SomeDATA; • Dataframe NEWDATA, which contains the variables used in computing MyModel, but different values for these variables. In NEWDATA I would like to compute (in an automated, quick, easy,

[R] Rserve : CStack usage too close to the limit

2010-04-15 Thread Matthieu Decorde
Hi, I use the Rserve package (RserveEngine.jar) and the Java client (REngine.jar) from Rforge. I manipulate R matrices from within Java. When calling a R function from the Java client on a R matrix, Rserve gives an error : CStack too close to the limit That error happens when the matrix has a

[R] Replace / with - in date

2010-04-15 Thread prem_R
Hi,every one .I have searched the solutions in the forum for replacing my date value which is in a data frame ,01/01/2000 to 01-01-2000 using replace function but got the following warning message x-2000/01/01 xd-as.data.frame(x) xd$x-replace(xd$x,xd$x==/,-) Warning message: In

Re: [R] R CMD REMOVE etc. query

2010-04-15 Thread Prof. John C Nash
Brian Ripley pointed out that the library() documentation (third screen, however) says that library() and require() check current environment to see if a package is loaded and only load if it is not present. I may have oversimplified, and clarifications welcome. But this is clearly NOT what I

Re: [R] Exporting an rgl graph

2010-04-15 Thread Gavin Simpson
On Thu, 2010-04-15 at 13:00 -0400, David Winsemius wrote: On Apr 15, 2010, at 12:34 PM, l...@stat.uiowa.edu wrote: The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1 ) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files

Re: [R] can't find daphnia.txt and others while working through Crawley's R-Book

2010-04-15 Thread David Hardie
Thanks again David. Looking again I now see the last line of the Acknowledgements which directs the reader to the author's website to get the datafiles. Of all the places I thought to look I had never considered reading the Acknowlegements! It seems to be that moving it about one line

Re: [R] histogram

2010-04-15 Thread Santosh
yes.. that now works! thank you so much, Paul Peter!! -santosh On Thu, Apr 15, 2010 at 3:11 AM, Paul Hiemstra p.hiems...@geo.uu.nl wrote: Santosh wrote: Thanks for your email... yes, I had tried that bw thing.. for some reason it does not seem to work.. could not figure out where I am

Re: [R] Exporting an rgl graph

2010-04-15 Thread baptiste auguie
On 15 April 2010 18:34, l...@stat.uiowa.edu wrote: The current issue of JCGS (Vol 18 No 1, http://pubs.amstat.org/toc/jcgs/19/1) has an editorial on including animations, 3D visualizations, and movies in on-line PDF files supporting JCGS articles. The online supplements to the editorial

  1   2   >