Re: [R] R does not subset

2013-05-07 Thread John Field
This typically occurs because of sloppy manual data entry outside of R. To relieve further analysis pain, you can manually clean the data (usually only effective for one-time analyses) or use R to fix problems right after loading the data (there are multiple methods for doing this... I prefer usin

[R] subsetting key on qqmath

2009-10-08 Thread John Field
orm(100); y2<-rnorm(100)+1; y3<-rnorm(100)+2; y<-c(y1,y2,y3) fact=factor(c(rep(1,100),rep(2,100),rep(3,100))) require(lattice) qqmath(~y,groups=fact,auto.key=list(corner=c(0,1)),subset=fact!=2) Many thanks, John Field ===== John Field Consulting Pty Ltd 10 High Stre

[R] lines.formula with subset

2008-11-13 Thread John Field
ines(y~x, subset=!is.na(y), col="red") # gives an error: Error in if (length(x) == l) x[s] else x : argument is of length zero Why does this happen? With thanks, John = John Field Consulting Pty Ltd 10 High Street, Burnside SA 5066 Phone 08 8332 5294 or 0409 097

Re: [R] Is there a R function for seasonal adjustment

2008-01-07 Thread John Field
decompose() or stl(). It seems that there should be one, but I couldn't find > it. Does anyone know? > > Thanks, > Tom, You could try Rob Hyndman's forecasting package, and seasadj in particular. You may find it useful to look at the task view for econometrics at CRAN, and i

Re: [R] Survival analysis with no events in one treatment group

2007-12-30 Thread John Field
, >Daniel > >- >cuncta stricte discussurus >- > >-Ursprüngliche Nachricht- >Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im >Auftrag von John Field >Gesendet: Sunday, December 30, 2007 9:16 PM >An: R-help@r-project.org >Betreff: [R] S

[R] Survival analysis with no events in one treatment group

2007-12-30 Thread John Field
the MLE of one of the coefficients is infinite since there are no admissions in one group. I'm looking for suggestions about how to proceed with an analysis of these data. I'd prefer not to ignore the fact that there are multiple admissions, but any alternative ideas I have at the moment do

[R] formatting POSIXlt object as strip labels in lattice plot

2007-11-22 Thread John Field
Nov 23:15", but if I use format(DateTime,format="%d %b %H:%M") to do the conversion, then the panels are ordered according to the day of the month, ie the character string "15 Nov 23:15" etc. How do I get labels in the required format, but panels in the correct order?

[R] Updating packages

2007-10-31 Thread John Field
I've just updated from R-2.5.1 to R-2.6.0, under Windows XP. Is there a simple way to reload into R-2.6.0 all the packages I had loaded under R-2.5.1? Thanks, John = John Field Consulting Pty Ltd 10 High Street, Burnside SA 5066 Australia Phone +61 8 8332 5294 or +6