Re: [R] Trying to run simple survival program in R > Hey, > > I am just starting to learn R now and I typed in this simple survival > program: >    >    library(survival) >    t <- c(10,13,18,19,23,30,36,38,54,56,59,75,93,97,104,107,107,107) >    c <- c(1,0,0,1,0,1,1,0,0,0,1,1,1,1,0,1,0,0) >    data <- Surv(t,c) >    km <- survfit(data)        >    summary(km) >    Call: survfit(formula = data)  It is best to use a formula with the survfit program; the preferred way to call  it would be    > km <- survfit(Surv(t, c) ~1)  > print(km)  > plot(km)    etc.       Terry Therneau ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.