[R] command in survival package
tlumley at u.washington.edu
Mon Jan 23 19:52:12 CET 2006
On Mon, 23 Jan 2006, Linda Lei wrote:
> Thank you guys.
> But I tried the commands and I still get:
>  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.
More information about the R-help