[Rd] Standard method for S4 object
Thibaut Jombart
jombart at biomserv.univ-lyon1.fr
Tue Feb 26 10:07:04 CET 2008
Oleg Sklyar wrote:
> similar. S3 gives more freedom in assigning new attributes, but this
> freedom also means that one has little control over the structure of an
> object making it, for example, more difficult to use with C/C++ code.
> Are there any specific benefits in not using S4 and slots (apart from
> some known performance issues)?
>
One could say there are, but not enough to make S3 prevail over S4. I am
not sure performance issues matter that much, but debugging functions
seems much easier to me with S3 methods. Plus, documenting objects and
accessing documentation can be a pain with S4 (see my previous post
about using example()
[http://tolstoy.newcastle.edu.au/R/e3/devel/07/12/0801.html] ... still
no answer).
Best,
Thibaut.
<http://adegenet.r-forge.r-project.org/>
More information about the R-devel
mailing list