[R] simple save question
David Winsemius
dwinsemius at comcast.net
Wed Jul 13 22:33:16 CEST 2011
On Jul 13, 2011, at 1:10 PM, Tom La Bone wrote:
> I want to assign the value of rmean from a survfit object to a
> variable so
> that it can be used in subsequent calculations, which is also what I
> interpreted the original poster to want. I did not understand Dr.
> Therneau's
> answer to the original poster, so I figured I would provide a simple
> example
> and see if someone could spoon feed me on how to do this. Dr.
> Winsemius
> seemed to have gotten an answer, but I have not been able to
> reproduce it.
>
> It appears to me that summary(fit) and summary.survfit(fit), where
> fit is an
> object created by survfit, are the same thing (the example on the
> summary.survfit help page reinforces this idea). I have played with
> the
> rmean=getOption('survfit.rmean') option in summary but I can't seem
> to get
> anywhere.
No. That is only a flag which the summary.survfit function uses to
determine whether to produce an rmean estimate. It should be a
character value.
When it exists, the *rmean estimate will be in the summary(fit,)$table
matrix (or vector).
Try this instead:
options(survfit.rmean = "individual")
summary(fit)$table
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list