On Sun, 7 May 2006, Heinz Tuechler wrote:

> Hello Xiaochun Li!
>
> Thank you for submitting the function. At the time I had that problem I
> solved it in a somewhat different way.
> I changed a few lines in the print.survfit method. I introduced a parameter
> "ret.res=FALSE" set to false to preserve the normal behaviour of print.
> The second last line "invisible(x)" I changed to:
>
> if (ret.res)
>       invisible(list(x,x1))
> else
>       invisible(x)
>
> So print.survfit returned the results. Of course, Your method has the
> advantage to work as long as the output structure of print.survfit does not
> change. At the end I would prefer the original function to be changed and
> when I find the time I will submit a worked proposal to Thomas Lumley, the
> maintainer of the survival package. In that way it would be available also
> in future versions of survival.

But all print() methods are required to return their first argument 
unchanged, so

foo
print(foo)

do the same thing.  See ?print.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to