Re: [R] simple save question

From: Terry Therneau <>
Date: Wed, 06 Apr 2011 07:49:51 -0500

When I run the survfit function, I want to get the restricted mean value and the standard error also. I found out using the "print" function to do so, as shown below,

The questions is, is there any way to extract these values from the print command?

Use sfit <- summary(fit). Then sfit$table contains the data the the print method produces.  

No, there isn't a way to extract them from the print command; the standard in S/R is for all print commands to return the object passed to them, without embellisment.

Terry Therneau mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 06 Apr 2011 - 12:52:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Apr 2011 - 13:20:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive