[R] Re : How to extract se(coef) from cph?

2010-08-05 Thread Biau David
Excellent! Yes, FH has a function to get LateX tables, but I not malleable enough. Thanks, David Biau. De : David Winsemius dwinsem...@comcast.net Cc : r help list r-help@r-project.org Envoyé le : Jeu 5 août 2010, 22h 11min 20s Objet : Re: [R] How to

Re: [R] PageUp/Down in gnome-terminal

2010-08-05 Thread Olga Lyashevska
On Thu, 2010-08-05 at 10:59 +0100, Liviu Andronic wrote: On Thu, 05 Aug 2010 11:13:00 +0200 Olga Lyashevska o...@herenstraat.nl wrote: I do not have any desktop environment (running R on a server), can I still try xfce? I am not very sure. If you are running gnome-terminal, I assume

[R] Reducing a list of functions by composition fails

2010-08-05 Thread Mog
Hi All, I'd like to be able to specify the ordered composition of several functions. So I defined compose: compose - function(f,g){ function(x){f(g(x))} } and some simple test functions: plus2 - function(x){x+2} plus3 - function(x){x+3} plus4 - function(x){x+4}

Re: [R] an issue about missing data

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 3:59 PM, karena wrote: library(GenABEL) gs.b - gs library(GenABEL) Loading required package: MASS GenABEL v. 1.6-0 (June 21, 2010) loaded gs.b - gs Error: object 'gs' not found You are not making this easy. I asked what str(gs) returned. Instead you gave us code but

Re: [R] [SPAM] - Reducing a list of functions by composition fails - Bayesian Filter detected spam

2010-08-05 Thread David Reiner
Funcall - function(f, ...) f(...) Reduce(Funcall,list(plus2,plus3,plus4),init=3,right=TRUE) [1] 12 Basically from the examples from ?Reduce. HTH, David L. Reiner XR Trading LLC -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mog

Re: [R] Reducing a list of functions by composition fails

2010-08-05 Thread Mog
I realize that the Funcall example with an init parameter will work, but I'd like to be able to get a one-argument function/closure out of that reduction, if at all possible. Sorry, I under-specified in my question. Thanks! __ R-help@r-project.org

Re: [R] Reducing a list of functions by composition fails

2010-08-05 Thread Gabor Grothendieck
On Thu, Aug 5, 2010 at 4:31 PM, Mog mogu...@gmail.com wrote: Hi All, I'd like to be able to specify the ordered composition of several functions. So I defined compose: compose - function(f,g){  function(x){f(g(x))} } and some simple test functions: plus2 - function(x){x+2} plus3 -

Re: [R] regression analysis with interactions

2010-08-05 Thread Jennifer Hou
Thank you very much for your kind reply, I have found that the error was in the stdCoeff function and not in the linear model. summary() works pretty well on my model, I will simply use another function to compute my coefficients. Best regards, Jennifer Date: Wed, 4 Aug 2010 15:27:40 -0500

Re: [R] regression analysis with interactions

2010-08-05 Thread Erik Iverson
Jennifer Hou wrote: Thank you very much for your kind reply, I have found that the error was in the stdCoeff function and not in the linear model. summary() works pretty well on my model, I will simply use another function to compute my coefficients. Best regards, Jennifer See ?coef ,

Re: [R] Reducing a list of functions by composition fails

2010-08-05 Thread David Reiner
OK: comp - function(x) Reduce(Funcall, list(plus2,plus3,plus4), init=x, right=TRUE) comp(3) [1] 12 but of course, Gabor's answer is more insightful and cleaner. -- David -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mog

[R] eval-parse and lme in a loop

2010-08-05 Thread Connolly, Colm
Hi everybody, I'm having trouble getting an eval-parse combination to work with lme in a for loop. Consider the code below. The call to lme outside the loop works. The call to aov inside the loop works, but the call to to lme inside the loop does not. The latter fails with Error in

Re: [R] Reducing a list of functions by composition fails

2010-08-05 Thread Mog
Thanks very much! Works fine now. I'll read up on R's evaluation model. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

[R] Download xls file from internet

2010-08-05 Thread Pete B
I am trying to download an Excel file from the the internet with the following R command download.file(http://ir.eia.gov/wpsr/psw09.xls,C:\\Temp\\psw09.xls;) The file is downloaded but when I try and open it I get a message from Excel telling me that the file is corrupt and it cannot be opened.

Re: [R] Download xls file from internet

2010-08-05 Thread Eik Vettorazzi
hi pete, try download.file(http://ir.eia.gov/wpsr/psw09.xls,C:\\Temp\\psw09.xls,mode=wb;) since xls are binary files. cheers Am 05.08.2010 23:25, schrieb Pete B: I am trying to download an Excel file from the the internet with the following R command

Re: [R] eval-parse and lme in a loop

2010-08-05 Thread Eik Vettorazzi
Hi Colm, the replaced code below works (its probably not the most elegant way, but rather the result of hours trial and error with eval, paste, bquote and Co). But if you want to keep all of your model results you should read the help for 'assign' and insert something like

Re: [R] Exporting nlme summary

2010-08-05 Thread Jun Shen
I believe this has been discussed many times in the archives. Here is one way to do it. Use function sink to direct the output to a file you specify sink(file='your file.txt') after you execute this command, all the output will be saved to your file and you won't see it on the screen. Say

Re: [R] Exporting nlme summary

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 6:22 PM, Jun Shen wrote: I believe this has been discussed many times in the archives. Here is one way to do it. Yes, you are so right. Use function sink to direct the output to a file you specify sink( file='your file.txt') after you execute this command, all the

Re: [R] Plotting range of values in barplot()

2010-08-05 Thread yankeetilidie
Works perfectly. Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Plotting-range-of-values-in-barplot-tp2315414p2315725.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] try-error within for loop

2010-08-05 Thread Wu Gong
Assigning the value directly to result[i] would give a null to result. Like that: result[[i]]-taxondiveO(abd,taxa) result[[i]]-as.data.frame(result[[i]])[1,] In fact your code's result should have null elements in it. You lost your nulls through do.call process. I can't find a way to assign

Re: [R] limits of a data frame size for reading into R

2010-08-05 Thread Matthew Keller
I sometimes have to work with vectors/matrices with 2^31 - 1 elements. I have found the bigmemory package to be of great help. My lab is also going to learn sqldf package for getting bits of big data into/out of R. Learning both of those packages should help you work with large datasets in R.

Re: [R] more questions on gam/gamm(mgcv)...

2010-08-05 Thread Gavin Simpson
Hi R-users, I'm using R 2.11.1, mgcv 1.6-2 to fit a generalized additive mixed model. I'm new to this package...and just got more and more problems... 1. Can I include correlation and/or random effect into gam( ) also? or only gamm( ) could be used? Only in gamm() 2. I want to estimate

[R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-05 Thread noclue_
I have a 64-bit windows box - Intel Xeon CPU E7340 @ 2.4GHz 31.9GB of RAM I have R 2.11.1 (64bit) running on it. My csv data is 3.6 GB (with about 15 million obs, 120 variables.) I have successfully imported the data above into R. No problem.

[R] Tobit Modelling

2010-08-05 Thread Patrick Sessford
Dear R-users, I would like to model data where the response variable consists of many minus ones and many different positive values that seem to follow an apparently separate distribution (ie. -1, -1, 0.5, -1, 3, 3.5, 1.2, -1, -1, 0.4, etc); no values of the response can be less than minus

[R] Stopping precision using 'optim'

2010-08-05 Thread Jeremy Beaulieu
Hi all~ I am wondering if it is possible to alter the stopping precision for parameters estimated using the 'optim'? If it helps, I am minimizing the log-likelihood of a function using constraints (i.e. L-BFG-S). -Jeremy __ R-help@r-project.org

Re: [R] 64-bit R on 64-bit Windows box... Still not enough memory?!

2010-08-05 Thread David Winsemius
On Aug 5, 2010, at 7:40 PM, noclue_ wrote: I have a 64-bit windows box - Intel Xeon CPU E7340 @ 2.4GHz 31.9GB of RAM I have R 2.11.1 (64bit) running on it. Dear noclue_; What does this return?: .Machine$sizeof.pointer My csv data is 3.6 GB (with about 15 million obs, 120

[R] Re : How to extract se(coef) from cph?

2010-08-05 Thread Biau David
thanks, it works just great. David Biau. De : Abhijit Dasgupta, PhD aikidasgu...@gmail.com Cc : r help list r-help@r-project.org Envoyé le : Jeu 5 août 2010, 22h 15min 37s Objet : Re: [R] How to extract se(coef) from cph? if the cph model fit is m1, you can

Re: [R] Multiply each depth level of an array with another vector element

2010-08-05 Thread Wu Gong
I have only achieved a half improvement. x - array(1:2400*1, dim = c(200,300,400)) y - 1:400*1 ptm - proc.time() z - x*as.vector(t(replicate(dim(x)[1]*dim(x)[2], y[1:dim(x)[3]]))) replicate: proc.time() - ptm x - array(1:2400*1, dim = c(200,300,400)) y - 1:400*1 ptm - proc.time() z -

[R] apply family functions

2010-08-05 Thread Steven Kang
Hi all, I would like to flag each record in the data according to certain conditions as specified below. For example, If Close_date in *dat* is between (Open Close) or (Open1 Close1) or (Open2 Close2) in *oc, *flag the records as Valid, otherwise Invalid I would like to use sapply family

<    1   2