[Rd] S3 method for S4 object
Martin Morgan
mtmorgan at fhcrc.org
Thu Feb 3 19:15:30 CET 2011
On 02/03/2011 09:29 AM, Paul Gilbert wrote:
> I am trying to extend an S3 method to work with an S4 object as well
> as the S3 objects it works with, but UseMethod does not seem to
> recognize the S4 class and dispatches to the default method. Is this
> to be expected or should I be looking for an error in my code?
>
> If it is not an error in my code, is there an easy way to do this, or
> do I have to convert the generic to S4 and then make those methods
> deal with the S3 objects?
Hi Paul
See ?Methods and the "Methods for S3 Generic Functions" section.
Martin
>
> (Using R 2.12.1 on Ubuntu 10.10.)
>
> Paul Gilbert
> ====================================================================================
>
> La version française suit le texte anglais.
>
> ------------------------------------------------------------------------------------
>
> This email may contain privileged and/or confidential information,
> and the Bank of Canada does not waive any related rights. Any
> distribution, use, or copying of this email or the information it
> contains by other than the intended recipient is unauthorized. If you
> received this email in error please delete it immediately from your
> system and notify the sender promptly by email that you have done so.
>
>
> ------------------------------------------------------------------------------------
>
> Le présent courriel peut contenir de l'information privilégiée ou
> confidentielle. La Banque du Canada ne renonce pas aux droits qui s'y
> rapportent. Toute diffusion, utilisation ou copie de ce courriel ou
> des renseignements qu'il contient par une personne autre que le ou
> les destinataires désignés est interdite. Si vous recevez ce
> courriel par erreur, veuillez le supprimer immédiatement et envoyer
> sans délai à l'expéditeur un message électronique pour l'aviser
> que vous avez éliminé de votre ordinateur toute copie du courriel
> reçu.
>
> [[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________ R-devel at r-project.org
> mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the R-devel
mailing list