Ken Knoblauch
2007-Mar-19 18:30 UTC
[Rd] Having rbind dispatch to a different method than data.frame with arguments inheriting from data.frame
I have defined an S3 class that inherits from data.frame. It has some additional attributes and a particular structure that a modeling function that I wrote require. I want to write an rbind method for this class which will combine the attributes correctly as well as the data.frame components. But the help page for rbind indicates Note that this algorithm can result in calling the data frame method if the arguments are all either data frames or vectors and indeed, the data.frame method is called unless I explicitly invoke rbind.mymethod(mm1, mm2) How can I get dispatch to mymethod rather than data.frame? I can imagine stripping the data.frame class before the call, but this seems awkward and I am hoping that there is a better way. Thank you. -- Ken Knoblauch Inserm U846 Institut Cellule Souche et Cerveau D?partement Neurosciences Int?gratives 18 avenue du Doyen L?pine 69500 Bron France tel: +33 (0)4 72 91 34 77 fax: +33 (0)4 72 91 34 61 portable: +33 (0)6 84 10 64 10 http://www.pizzerialesgemeaux.com/u846/