[R] error

David Winsemius dwinsemius at comcast.net
Fri Feb 12 06:11:49 CET 2010


On Feb 11, 2010, at 9:31 PM, nurnabilanabil at hotmail.com wrote:

> list<-read.csv("c:\\temp\\data.csv")
> list
> library(survival)
> status<-1*(>0)

Not sure what that was supposed to do, or even if it will parse.

> plot
> (survfit
> (Surv(status,time)~1,data=list),ylab="Survivorship",xlab="Time")
> model<-survfit(Surv(time,status)~1, data=list
>
> plot
> (survfit
> (Surv(status,time)~1,data=list),ylab="Survivorship",xlab="Time")

Regardless of the error, I am a bit concerned about the order of your  
arguments to Surv()

> Error in Surv(status, time) : Time and status are different lengths
>
> what does it means (time and status are different lengths?)

Type:

length(list$tatus)
length(list$time)

# And "list" is an exceptionally bad name for an R dataframe.

> please do help me..
> thank you very much :)

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list