Hello list. This is from an R session (admittedly, I''m still using R 2.11.1):> showMethods("print")Function "print": <not a generic function> Don''t the two results contradict each other? Or do I have a terrible misunderstanding of what comprises a generic function? Thx, Nick Sabbe -- ping: nick.sabbe@ugent.be link: <http://biomath.ugent.be/> http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove [[alternative HTML version deleted]]
Hi Nick, There is a difference between the newer S4 generic functions/methods and S3 generic functions. See for example: methods("print") showMethods("show") ?Methods HTH, -Francisco On Fri, Mar 4, 2011 at 10:14 AM, Nick Sabbe <nick.sabbe@ugent.be> wrote:> Hello list. > > > > This is from an R session (admittedly, I'm still using R 2.11.1): > > > print > > function (x, ...) > > UseMethod("print") > > <environment: namespace:base> > > > showMethods("print") > > > > Function "print": > > <not a generic function> > > > > Don't the two results contradict each other? Or do I have a terrible > misunderstanding of what comprises a generic function? > > > > Thx, > > > > Nick Sabbe > > -- > > ping: nick.sabbe@ugent.be > > link: <http://biomath.ugent.be/> http://biomath.ugent.be > > wink: A1.056, Coupure Links 653, 9000 Gent > > ring: 09/264.59.36 > > > > -- Do Not Disapprove > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Hi Nick, I think showMethods is for s4 classes (which I know nothing about). I think you want methods(print) Best, Ista On Fri, Mar 4, 2011 at 10:14 AM, Nick Sabbe <nick.sabbe at ugent.be> wrote:> Hello list. > > > > This is from an R session (admittedly, I'm still using R 2.11.1): > >> print > > function (x, ...) > > UseMethod("print") > > <environment: namespace:base> > >> showMethods("print") > > > > Function "print": > > ?<not a generic function> > > > > Don't the two results contradict each other? Or do I have a terrible > misunderstanding of what comprises a generic function? > > > > Thx, > > > > Nick Sabbe > > -- > > ping: nick.sabbe at ugent.be > > link: ?<http://biomath.ugent.be/> http://biomath.ugent.be > > wink: A1.056, Coupure Links 653, 9000 Gent > > ring: 09/264.59.36 > > > > -- Do Not Disapprove > > > > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
On 04.03.2011 11:14, Nick Sabbe wrote:> Hello list. > > > > This is from an R session (admittedly, I'm still using R 2.11.1): > >> print > > function (x, ...) > > UseMethod("print") > > <environment: namespace:base> > >> showMethods("print") > > > > Function "print": > > <not a generic function> > > > > Don't the two results contradict each other? Or do I have a terrible > misunderstanding of what comprises a generic function?print() is an S3 generic while showMethods() shows S4 generics. To get a list of possible S3 generics, use methods("print"). The S4 generic corresponding to print() is called show(). Uwe Ligges> > > Thx, > > > > Nick Sabbe > > -- > > ping: nick.sabbe at ugent.be > > link:<http://biomath.ugent.be/> http://biomath.ugent.be > > wink: A1.056, Coupure Links 653, 9000 Gent > > ring: 09/264.59.36 > > > > -- Do Not Disapprove > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.