Re: [R] Logistic Stepwise Criterion

2011-03-01 Thread Mano Gabor Toth
Thanks a lot for your last letter, you're right, I wasn't clear enough. I've already tried AIC before, but I thought that comparing models based on this criterion would be applicable if I had good models and I wanted to find the best fitting one. However, I only have poor models with high AIC, and

Re: [R] error in saved .csv

2011-03-01 Thread Don McKenzie
If you have ONE data frame that you want to export to excel (I believe that was the original request), you probably don't need to change any of the default arguments to write.csv(), except row.names, which will give you an extra column. On Mar 1, 2011, at 2:50 PM, Tamas Barjak wrote: Yes, the

[R] Difference in numeric Dates between Excel and R

2011-03-01 Thread Luis Felipe Parra
Hello. I am using some dates I read in excel in R. I know the excel origin is supposed to be 1900-1-1. But when I used as.Date with origin=1900-1-1 the dates that R reported me where two days ahead than the ones I read from Excel. I noticed that when I did in R the following:

Re: [R] How to prove the MLE estimators are normal distributed?

2011-03-01 Thread Bill.Venables
This is a purely statistical question and you should try asking it on some statistics list. This is for help with using R, mostly for data analysis and graphics. A glance at the posting guide (see the footnote below) might be a good idea. -Original Message- From:

Re: [R] inefficient ifelse() ?

2011-03-01 Thread William Dunlap
Try using [- more, instead of ifelse(). I rarely find myself really using both of the calls to [- that ifelse makes. E.g., I use x[x==999] - NA instead of x - ifelse(x==999, NA, x) But if you find yourself using ifelse in a certain way often, try writing a function that only allows that

Re: [R] glht() used with coxph()

2011-03-01 Thread array chip
In case anyone is interested, I figure it out that when strata is used, I have to specify the comparison matrix manually: (fit-coxph(Surv(stop, status0)~treatment+strata(enum),bladder1)) coef(fit) treatmentpyridoxine treatmentthiotepa 0.1877925 -0.2097894

Re: [R] Difference in numeric Dates between Excel and R

2011-03-01 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Luis Felipe Parra Sent: Tuesday, March 01, 2011 3:07 PM To: r-help Subject: [R] Difference in numeric Dates between Excel and R Hello. I am using some dates I read in excel in

[R] does rpy support R 2.12.2

2011-03-01 Thread Pete Shepard
Hi, I am getting the following error when I try to run import rpy from the the python IDE: Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/dist-packages/rpy.py, line 134, in module % RVERSION) RuntimeError: No module named _rpy2122 RPy

Re: [R] Difference in numeric Dates between Excel and R

2011-03-01 Thread David Scott
On 2/03/2011 12:31 p.m., Nordlund, Dan (DSHS/RDA) wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Luis Felipe Parra Sent: Tuesday, March 01, 2011 3:07 PM To: r-help Subject: [R] Difference in numeric Dates between Excel and

[R] Plotting a 3D histogram

2011-03-01 Thread Robert A'gata
Hi - I am wondering if there is any package that does plotting of joint histogram between 2 variables, i.e. f(x,y). I found rgl but it seems not so intuitive to use. I'm wondering if there is any alternative. Thank you. Robert __ R-help@r-project.org

[R] merge in data.tables -- non-visible

2011-03-01 Thread Ted Rosenbaum
Hi, I am trying to use the merge command in the data.tables package. However, when I run the command I am not sure if it is running the merge command from the base package or the merge command from data.tables. When I run methods(generic.function=merge)' it informs me that 'merge.data.table is

Re: [R] accessing variables inside a function, inside a loop

2011-03-01 Thread zListserv
Joshua Great solution. Taking off on your code, the following works but does not display the names of the variables in the formula. Any suggestions about how to modify the function so that it displays the correct formula (e.g., glm(formula = y1 ~ x1 * x2, data = dat) instead of glm(formula =

Re: [R] problems with playwith

2011-03-01 Thread Michael Lawrence
Do you get an error message in a dialog box? My guess is that you just need to update your GTK+. On Tue, Mar 1, 2011 at 8:58 AM, R Heberto Ghezzo, Dr heberto.ghe...@mcgill.ca wrote: hello, i tried to run playwith but : library(playwith) Loading required package: lattice Loading required

Re: [R] merge in data.tables -- non-visible

2011-03-01 Thread Steve Lianoglou
Hi Ted, On Tue, Mar 1, 2011 at 9:45 PM, Ted Rosenbaum ted.rosenb...@yale.edu wrote: Hi, I am trying to use the merge command in the data.tables package. However, when I run the command I am not sure if it is running the merge command from the base package or the merge command from

[R] the features of the truth

2011-03-01 Thread Alexy Khrabrov
This is really a statistics problem, so I wonder which R packages can be employed best to solve and visualize it. I run a lot of simulations to approach the truth. The truth is a result of very complex computations, and is a real number. The closer it is to 0, the truthier it is. Each

Re: [R] accessing variables inside a function, inside a loop

2011-03-01 Thread Joshua Wiley
Hi Alan, Other more knowledgeable people may have better opinions on this than I do. Manipulating language and call objects is seriously stretching my skills. \ In any case, two ways come to mind, both of them sufficiently cumbersome I would seriously question the value (btw, this is a

Re: [R] getting attributes of list without the names.

2011-03-01 Thread Jeroen Ooms
Thank you, this is very helpful. I am a little confused now about the structure of a list though. If the names of the list-elements is truly an attribute that is stored in another list this would lead to an infintely recursing object? How could I iterate over the full object tree, without getting

[R] Pairwise T-Tests and Dunnett's Test (possibly using multcomp)

2011-03-01 Thread Paul Miller
Hello Everyone,   Figured out one part of the code. Setting the reference level for a factor is accomplished using the relevel funtion (pg. 383 of MASS; pg. 70 of Data Manipulation with R):   gad$dosegrp - relevel(gad$dosegrp,3)   This works very well. Much better than using a format in SAS

[R] a question on sqldf's handling of missing value and factor

2011-03-01 Thread xin wei
Dear subscribers: I am using the following code to read a large number of big text files: library(sqldf) tempd - file() tempdx - sqldf(select * from tempd, dbname = tempfile(), file.format = list(header = T, sep=\t, row.names = F)) The problem is: all my numberical variable become factor

Re: [R] Difference in numeric Dates between Excel and R

2011-03-01 Thread Prof Brian Ripley
On Wed, 2 Mar 2011, Luis Felipe Parra wrote: Hello. I am using some dates I read in excel in R. I know the excel origin is supposed to be 1900-1-1. But when I used as.Date with origin=1900-1-1 the dates that R reported me where two days ahead than the ones I read from Excel. I noticed that when

Re: [R] Pairwise T-Tests and Dunnett's Test (possibly using multcomp)

2011-03-01 Thread Joshua Wiley
Hi Paul, Changing the factor levels will work (as you saw). In this case, you could also edit the contrast matrix. ## look at default contrasts contrasts(gad$dosegrp) model1 - lm(hama ~ dosegrp, data = gad) summary(model1) ## choose group 3 as base (comparison) contrasts(gad$dosegrp) -

<    1   2