On Mon, 23 Jan 2006, Linda Lei wrote:

> Thank you guys.
> But I tried the commands and I still get:
>
>> aml1<-aml[aml$group==1,]
>> aml1
> [1] time   status x
> <0 rows> (or 0-length row.names)
>> esf.fit <- survfit(Surv(aml1$weeks,status) ~ 1)
> Error in Surv(aml1$weeks, status) : Time variable is not numeric
> In addition: Warning message:
> is.na() applied to non-(list or vector) in: is.na(time)
>
> which still looks confusing. Or are they should be applied in s-plus
> instead of R?

You *still* haven't said where the aml dataset comes from, but as I said 
before, it isn't the same as the one built in to R, so you need to load it 
somehow.  The one in R has columns called "time", "status" and "x"; you 
appear to want one with columns "weeks","status", and "group", and with 
"group" being numeric rather than factor.


        -thomas

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to