Re: [R] Extracting results from a function output

2011-10-18 Thread Terry Therneau
Let me rephrase your question: "How do I get the results that are printed by print(survfit())" Answer: read the help file "?print.survfit" __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

Re: [R] Extracting results from a function output

2011-10-17 Thread David Winsemius
On Oct 17, 2011, at 11:13 AM, Cem Girit wrote: Hello, I am having hard time obtaining a value from a function. "fit" is a survival function that produces some results, such as "median", "confidence intervals" etc. But str() function does not list these values. How can I extract these to b

Re: [R] Extracting results from a function output

2011-10-17 Thread William Dunlap
unlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of R. Michael > Weylandt > Sent: Monday, October 17, 2011 8:51 AM > To: Cem Girit > Cc: r-help@r-pro

Re: [R] Extracting results from a function output

2011-10-17 Thread R. Michael Weylandt
Assuming I'm reading your post correctly -- fit is the output object and the lines following >fit are the console output, which implicitly calls print -- it looks like the median isn't stored in fit but is calculated on the fly in the print call. But this doesn't seem consistent with your claim tha