From jombart at biomserv.univ-lyon1.fr  Tue Feb 26 10:07:04 2008
From: jombart at biomserv.univ-lyon1.fr (Thibaut Jombart)
Date: Tue, 26 Feb 2008 10:07:04 +0100
Subject: [Rd] Standard method for S4 object
In-Reply-To: <47C3066B.8030804@ebi.ac.uk>
References: <47C06F0A.4090505@u-paris10.fr>
	<uy79957by.fsf@insightful.com>	<47C2F422.6040608@ebi.ac.uk>
	<uve4c6hor.fsf@insightful.com> <47C3066B.8030804@ebi.ac.uk>
Message-ID: <47C3D6B8.7040603@biomserv.univ-lyon1.fr>

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/>



[Rd] Standard method for S4 object
Thibaut Jombart