Just an observation, since this email has no indication of what you're trying to get at and I'm not inspired to dig back through the list:
On Wed, Jul 13, 2011 at 11:16 AM, Tom La Bone <boo...@gforcecable.com> wrote: > > No cigar. This is what I get and my session info. Any suggestions? >> >> library(survival) >> library(ISwR) >> dat.s <- Surv(melanom$days,melanom$status==1) >> fit <- survfit(dat.s~1) >> print(fit, print.rmean=TRUE) > Call: survfit(formula = dat.s ~ 1) > > records n.max n.start events *rmean *se(rmean) median > 205 205 205 57 4125 161 NA > 0.95LCL 0.95UCL > NA NA > * restricted mean with upper limit = 5565 >> sfit <- summary(fit) >> sfit$table[5] > median > NA print(fit, print.rmean=TRUE) is not the same thing as summary(fit) > names(summary(fit)$table) [1] "records" "n.max" "n.start" "events" "median" "0.95LCL" "0.95UCL" shows that element 5 is the median, which is NA for your data as shown in your own output. You need to dig into the rmean option to summary.survfit to get it to export the value (I think) you want. Sarah -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.