Re: [R] zip.file.extract on Windows

2007-03-31 Thread Prof Brian Ripley
The current (you give no version information) help file says: file: A file name. (If a path is given, see 'Note'.) zipname: The file name (not path) of a 'zip' archive, including the '.zip' extension if required. ... This is a helper function for 'help', 'example' and

Re: [R] substitute NA values

2007-03-31 Thread Jim Lemon
Sergio Della Franca wrote: Dear R-Helpers, I have the following data set(y): Test_Result #_Test t 10 f 14 f 25 f NA f 40 t45 t44 NA

[R] add confidence intervales to xyplot for ANCOVA and extracting info

2007-03-31 Thread Patrick Drechsler
Hi, I would like to add confidence intervales to an ANCOVA with 2 covariates when using xyplot. What would be a good way of accomplishing this? --8---cut here---start-8--- rm(list = ls(all = TRUE)) rm(list = c(ls())) library(lattice) ## 1. generate data

[R] adding slashes in sql querys

2007-03-31 Thread Laurent Valdes
Hi everybody, I'm doing a sqlSave() in R, to insert a big data frame of 1 rows. However, there is problems, since several rows contains quotations marks, that can leave inserts buggy. I would like to find a way to add slashes in front of these quotation marks. Best regards, Laurent -- We

[R] strange fisher.test result

2007-03-31 Thread Williams Scott
A simple question - using the following fishers test it appears that the P value is significant, but the CI includes 1. Is this result correct? data.50p10min - matrix(c(16,15, 8, 24),nrow=2) fisher.test(data.50p10min) Fisher's Exact Test for Count Data data: data.50p10min

Re: [R] strange fisher.test result

2007-03-31 Thread Ted Harding
On 31-Mar-07 13:36:04, Williams Scott wrote: A simple question - using the following fishers test it appears that the P value is significant, but the CI includes 1. Is this result correct? data.50p10min - matrix(c(16,15, 8, 24),nrow=2) fisher.test(data.50p10min) Fisher's Exact

Re: [R] strange fisher.test result

2007-03-31 Thread Prof Brian Ripley
The two-sided test of odds-ratio=1 is not necessarily (nor in this case) the same thing as an equal-tailed confidence interval: see the help page comment Two-sided tests are based on the probabilities of the tables, and take as 'more extreme' all tables with probabilities less than

Re: [R] Wikibooks

2007-03-31 Thread kaloytyn
I think we occasionally think that it is very easy to get information because we know how to find the information. This does not mean that other people know how to find the answer. It is for this reason that questions appear on the listserver that we might think could be easily found from

Re: [R] Wikibooks

2007-03-31 Thread Berwin A Turlach
G'day Kaltja, On Sat, 31 Mar 2007 10:19:00 +0300 (EEST) [EMAIL PROTECTED] wrote: [...] I did not even now there was R wiki. I couldn't find a link from the R organization pages to it or am I just blind? If you talk about CRAN (e.g. http://cran.r-project.org/) then no, but if you really talk

[R] lda() function and Fisher's LDA

2007-03-31 Thread Christopher A. Harle
Hi, I am using the function lda() from MASS for finding reduced-dimensional representations of a datset. In reading various texts to compare LDA with Fisher's LDA approach (including Ripley's Modern Applied Statistics with S-Plus), it is still unclear to me whether or not they produce the

Re: [R] adding slashes in sql querys

2007-03-31 Thread Gabor Grothendieck
Try this: 'my dog named Spot and my cat named Kitty fight like cats and dogs' On 3/31/07, Laurent Valdes [EMAIL PROTECTED] wrote: Hi everybody, I'm doing a sqlSave() in R, to insert a big data frame of 1 rows. However, there is problems, since several rows contains quotations marks,

Re: [R] Linear model and time series

2007-03-31 Thread Achim Zeileis
On Sat, 31 Mar 2007, Andre Jung wrote: Dear all, I have three timeseries Uts, Vts, Wts. The relation between the time series can be expressed as Uts = x Vts + y Wts + residuals How would I feed this to lm() to evaluate the unknowns x and y? If the time series are aligned (and univariate)

Re: [R] Using split() several times in a row?

2007-03-31 Thread Martin Maechler
SteT == Stephen Tucker [EMAIL PROTECTED] on Fri, 30 Mar 2007 18:41:39 -0700 (PDT) writes: [..] SteT For dates, I usually store them as POSIXct classes SteT in data frames, but according to Gabor Grothendieck SteT and Thomas Petzoldt's R Help Desk article SteT

[R] Bootstrap for Time Series

2007-03-31 Thread tariq algazzale
Hi everyone, Currently I work for Master degree in statistics at Garyounis University. My dissertation on

Re: [R] Using split() several times in a row?

2007-03-31 Thread Gabor Grothendieck
On 3/31/07, Martin Maechler [EMAIL PROTECTED] wrote: SteT == Stephen Tucker [EMAIL PROTECTED] on Fri, 30 Mar 2007 18:41:39 -0700 (PDT) writes: [..] SteT For dates, I usually store them as POSIXct classes SteT in data frames, but according to Gabor Grothendieck SteT and

[R] Help in getting aggregated data

2007-03-31 Thread Deepak Manohar
Hi team, I have the data of the form: a- data.frame(x=c(1,2,1,4,3), y=c(1,2,1,4,3), z=c(1,2,3,4,5)) I need the output of the form b- data.frame(x=c(1,2,3,4), y=c(1,2,3,4), z=(3,2,5,4) ) As you can see, the Z value contains the maximum for each of the (x,y) combinations. I used c-by(a$z,

Re: [R] Help in getting aggregated data

2007-03-31 Thread jim holtman
Try this: a x y z 1 1 1 1 2 2 2 2 3 1 1 3 4 4 4 4 5 3 3 5 # create indices of groups indices - split(seq(nrow(a)), list(a$x, a$y), drop=TRUE) combine - lapply(indices, function(.ind){ + # create a row representing the max of z + c(x=a$x[.ind[1]], y=a$y[.ind[1]], z=max(a$z[.ind])) +

[R] commandArgs usage and --args invokation

2007-03-31 Thread ivo welch
Dear R experts: I am a bit stymied by how the argument picking-off works in R batch file usage. $ cat commandArgs.R cat( Command Line Arguments were , commandArgs(), \n); $ /usr/bin/R CMD BATCH commandArgs.R --args 1 2 3 $ /usr/bin/R --args 1 CMD BATCH commandArgs.R ... I am now getting into

[R] plotting POSIXct objects {was Re: Using split() several times in a row?}

2007-03-31 Thread Stephen Tucker
Hi Gabor and Martin, Thanks very much for the information. (and Gabor for the Fold() routine included in original reply) Regarding changes, I wonder if the behavior of plot() on POSIXct objects changed also. According to Rnews Vol. 4/1, p. 31, = dp - seq(Sys.time(),len=10,by=day)

Re: [R] plotting POSIXct objects {was Re: Using split() several times in a row?}

2007-03-31 Thread Gabor Grothendieck
I think you are right. Plot does seem to have changed and maybe its due to a change in plot or maybe due to a change in some routine it in turn calls. Here is another test: dd - ISOdatetime(2007, 1, 1:3, 0, 0, 0, tz = ) plot(dd, 1:3) dd.gmt - ISOdatetime(2007, 1, 1:3, 0, 0, 0, tz = GMT)

Re: [R] Help in getting aggregated data

2007-03-31 Thread Gabor Grothendieck
Try this: aggregate(a[3], a[1:2], max) On 3/31/07, Deepak Manohar [EMAIL PROTECTED] wrote: Hi team, I have the data of the form: a- data.frame(x=c(1,2,1,4,3), y=c(1,2,1,4,3), z=c(1,2,3,4,5)) I need the output of the form b- data.frame(x=c(1,2,3,4), y=c(1,2,3,4), z=(3,2,5,4) ) As

[R] Doing partial-f test for stepwise regression

2007-03-31 Thread zhuanyi
Hello all, I am trying to figure out an optimal linear model by using stepwise regression which requires partial f-test, I did some Googling on the Internet and realised that someone seemed to ask the question before: Jim Milks [EMAIL PROTECTED] writes: Dear all: I have a regression model

[R] Genetic programming with R?

2007-03-31 Thread kone
Hello everybody, I'm interesting in evolutionary algorithms. I have tested genetic algorithms with R but has someone tried with genetic programming? Do you know, if there are code somewhere written in R. Best wishes, Atte Tenkanen University of Turku, Finland

Re: [R] Doing partial-f test for stepwise regression

2007-03-31 Thread Petr Klasterecky
And what about to read the help page ?anova ...? When given a sequence of objects, 'anova' tests the models against one another in the order specified. Generally you almost never fit a full model (including all possible interactions etc) - no one can interpret such complicated models.