[R] Extracting Coefficients and Such from mle2 Output

Marc Schwartz marc_schwartz at comcast.net
Sun Feb 1 18:43:05 CET 2009


on 02/01/2009 10:45 AM David Winsemius wrote:
> Let me  admit at this point that I am not really sure that S4 classes is
> the correct classification of such "@"-using extraction processes. The
> documentation refers to "formal methods" and I don't yet have enough
> knowledge to know that how tightly slots and formal classes are linked
> with S4 or S3.

David,

The use of '@' as a slot extractor is specific to S4 methods and you
will actually get an error if attempting to use it on other object
types. As per the Details section of ?"@":

As from R 2.7.0 it is checked that object is an S4 object (see isS4),
and as from R 2.8.0 it is an error to attempt to use @ on any other
object. (There is an exception for name .Data for internal use only.)



There are some good references on S4 methods in the wiki if you wish to
read further:

 http://wiki.r-project.org/rwiki/doku.php?id=tips:classes-s4

HTH,

Marc Schwartz




More information about the R-help mailing list