From kate at few.vu.nl  Sun Feb 24 19:00:58 2008
From: kate at few.vu.nl (Katharine Mullen)
Date: Sun, 24 Feb 2008 19:00:58 +0100 (CET)
Subject: [Rd] Standard method for S4 object
In-Reply-To: <47C06F0A.4090505@u-paris10.fr>
References: <47C06F0A.4090505@u-paris10.fr>
Message-ID: <Pine.GSO.4.56.0802241851210.17681@laurel.few.vu.nl>

I don't know of any  '"non official list" of what method a new S4 object
should have' - such a list would have to depend on what the object
represents.  If it represents the output of fitting a model, then methods
for 'residuals', 'fitted' and 'coefficients' would probably be nice.

Also, out of curiosity, what do your methods for `get' and `set' for each
slot look like?  Is there any advantage to using such methods over using

slot(objectOfYourClass, "aSlotName") # for get, and
slot(objectOfYourClass, "aSlotName") <- aValue # for set

On Sat, 23 Feb 2008, Christophe Genolini wrote:

> Hi the list,
>
> I am defining a new class. 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 should have.
> More precisely, personally, I use 'print', 'summary' and 'plot' a lot.
> So for my new class, I define these 3 methods and of course, a get and a
> set for each slot. What else? Is there some other methods that a R user
> can reasonably expect? Some "minimum basic tools"...
>
> Thanks
>
> Christophe
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] Standard method for S4 object
Katharine Mullen