Re: [R] Standard method for S4 object

From: Thibaut Jombart <jombart_at_biomserv.univ-lyon1.fr>
Date: Sat, 23 Feb 2008 16:23:12 +0100

Christophe Genolini wrote:

>Hi the list,
>
>I am defining a new class MyClass. Shortly, I will submit a package with
>it. Before, I would like to know if there is a kind of "non official
>list" of what method a new S4 object have.
>More precisely, personnaly, I use 'print', 'summary' and 'plot' a lot.
>So for my new class, I define these 3 methods. Is there some other
>method that a R user can raisonnably expect ? Some "minimum basic tools"...
>
>Thanks
>
>Christophe
>
>
Hi,

/I think your question should be more relevant on Rdev./ I am not sure that 'print' is called when printing an S4 object. I think 'show' is used instead.
You might find which methods are usual: http://wiki.r-project.org/rwiki/doku.php?id=tips:classes-s4 may help.
Personnally I would find stuff like "names", "$", "$<-", or "[" useful as these are usual operation with S3 objects.

Regards,

Thibaut.

-- 
######################################
Thibaut JOMBART
CNRS UMR 5558 - Laboratoire de Biométrie et Biologie Evolutive
Universite Lyon 1
43 bd du 11 novembre 1918
69622 Villeurbanne Cedex
Tél. : 04.72.43.29.35
Fax : 04.72.43.13.88
jombart_at_biomserv.univ-lyon1.fr
http://lbbe.univ-lyon1.fr/-Jombart-Thibaut-.html?lang=en
http://pbil.univ-lyon1.fr/software/adegenet/

______________________________________________
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.
Received on Sat 23 Feb 2008 - 15:28:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 24 Feb 2008 - 16:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive