On Sep 5, 2012, at 2:05 PM, Andrew Yee wrote: > The answer to this may be obvious, but I was wondering in the rms > package and the survfit(), how you can plot the censored time points > as ticks.
survfit() is not in rms. > > Take for example, > > library(survival) > library(rms) > > foo <- data.frame(Time=c(1,2,3,4,5,6,10), Status=c(1,1,0,0,1,1,1)) > answer <- survfit(Surv(foo$Time, foo$Status==1) ~1) > > # this shows the censored time points as ticks at Time = 3 and 4 > plot(answer) > > # how do you achieve something similar with survplot() > survplot(answer) > You should read more widely in the survival help pages. Since rms is in many cases built on top of the survival package. That 'answer'-object is of class "survfit" and there is a lines() method for survfit-objects. help(survfit) # follow links to lines lines(answer) # ticks appear. -- David Winsemius, MD Alameda, CA, USA ______________________________________________ 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.