On Jul 13, 2011, at 7:34 AM, Tom La Bone wrote:
Well, that took a bit of detective work!
It was a lot more work to do it "my way" than doing it the "right
way", which would have been to read the help page more carefully.
Thanks. I am still not doing
something right here in my efforts to implement the "easy way". Can
you
point out my error?
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]
Error in sfit$table[, 5] : incorrect number of dimensions
In your case, you only have one row and R drops the superfluous
dimension so :
> sfit$table[5]
*rmean
4124.8
--
View this message in context:
http://r.789695.n4.nabble.com/simple-save-question-tp3429148p3664808.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
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.
David Winsemius, MD
West Hartford, CT
______________________________________________
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.