Christophe Dutang
2009-Sep-19 09:26 UTC
[R] generic methods - in particular the summary function
Hi all, I'm currently working on the fitdistrplus package (that basically fit distributions). There is something I do not understand about the generic function summary. In the current version on CRAN, there is no NAMESPACE saying S3method(summary, fitdist) . However if we use summary on an object send by fitdist function it works fine... According to R-lang, we have " The most common use of generic functions is to provide print and summary methods for statistical ob jects, generally the output of some model fitting process. To do this, each model attaches a class attribute to its output and then provides a special method that takes that output and provides a nice readable version of it. The user then needs only remember that print or summary will provide nice output for the results of any analysis. " I would like to be sure, that if the summary.fitdist is not exported in the NAMESPACE, then we must use declare it with S3method. Thanks in advance Christophe -- Christophe Dutang Ph.D. student at ISFA, Lyon, France website: http://dutangc.free.fr [[alternative HTML version deleted]]
Christophe Dutang
2009-Sep-27 16:52 UTC
[R] Fwd: generic methods - in particular the summary function
Nobody wants to answer my question... is there something stupid in it? Début du message réexpédié :> De : Christophe Dutang <dutangc@gmail.com> > Date : 19 septembre 2009 11:26:51 HAEC > À : r-help@r-project.org > Objet : generic methods - in particular the summary function > > Hi all, > > I'm currently working on the fitdistrplus package (that basically > fit distributions). There is something I do not understand about the > generic function summary. > > In the current version on CRAN, there is no NAMESPACE saying > > S3method(summary, fitdist) > > . > However if we use summary on an object send by fitdist function it > works fine... > > According to R-lang, we have > " > The most common use of generic functions is to provide print and > summary methods for > statistical ob jects, generally the output of some model fitting > process. To do this, each model > attaches a class attribute to its output and then provides a special > method that takes that output > and provides a nice readable version of it. The user then needs only > remember that print or > summary will provide nice output for the results of any analysis. > " > > I would like to be sure, that if the summary.fitdist is not exported > in the NAMESPACE, then we must use declare it with S3method. > > Thanks in advance > > Christophe > > -- > Christophe Dutang > Ph.D. student at ISFA, Lyon, France > website: http://dutangc.free.fr >-- Christophe Dutang Ph.D. student at ISFA, Lyon, France website: http://dutangc.free.fr [[alternative HTML version deleted]]