[R] Summary method needed?

Christian Hennig chrish at stats.ucl.ac.uk
Wed Aug 2 20:59:19 CEST 2006


Thank you Brian!

>> I'm updating my fpc package at the moment and will add some new functions.
>> I learned that there should be print and summary methods for the key
>> functions.
>
> for 'classes', I think.

Yes.

>> But in some cases the print method will make use of more or less all the
>> output information of the function. Is there any reason to implement a
>> summary method in these cases?
>
> Would a more concise print() method be useful?  If so the existing print()
> could become summary().

:-)
What I initially did some years ago was to write summary methods to print 
out the required informations. Then M. Maechler told me that this is not 
the purpose of a summary method and I should write a print.summary method 
for this. Now I realise that I actually just want to print, and I don't 
really need the extra "synopsis" to be done by summary().

Now is there any recommendation on this? My intuition would be to write a 
print, but not a summary method.

Christian

>
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> 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
>

*** --- ***
Christian Hennig
University College London, Department of Statistical Science
Gower St., London WC1E 6BT, phone +44 207 679 1698
chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche



More information about the R-help mailing list