[R] How to extract table results from survival summary object
Rianna Morgan
rmorgan at trystero.is
Tue Oct 7 15:50:32 CEST 2014
Hi Juan,
If you do:
summaryMatrix <- res$surv
that should get the last matrix in the summary call assigned to
summaryMatrix. If you're not looking for the 'surv' matrix, entering:
res$
into the console and tab-completing should allow you to select the
element of the summary object that you'd like.
Hope this helps,
--
Rianna Morgan, MA
rmorgan at trystero.is
On Tue, Oct 7, 2014, at 06:40 AM, Juan Andres Hernandez wrote:
> Hi. I need to extract the "matrix" or "data.frame" results from a
> survival
> object.
>
> library(survival)
> data(lung)
> mod=with(lung, survfit(Surv(time,death)~ 1))
> res=summary(mod)
>
> res show in consola the "matrix" I am looking for, but I can't find the
> way
> to save or assign this table to an object. Anyone knows how to solve it.
> Thank's in advance
>
> Juan A. Hernández
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list