Re: [R] command in survival package

From: Thomas Lumley <>
Date: Tue 24 Jan 2006 - 05:52:12 EST

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)
>> <- survfit(Surv(aml1$weeks,status) ~ 1)
> Error in Surv(aml1$weeks, status) : Time variable is not numeric
> In addition: Warning message:
> applied to non-(list or vector) in:
> 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 mailing list PLEASE do read the posting guide! Received on Tue Jan 24 06:04:09 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:09 EST