object@name
object@name <- value
object
.object
.slot
for further details, in particular
for the differences between slot()
and the @
operator. It is checked that object
is an S4 object (see
isS4
), and it is an error to attempt to use @
on
any other object. (There is an exception for name .Data
for
internal use only.) The replacement operator checks that the slot
already exists on the object (which it should if the object is really
from the class it claims to be).
Prior to R 3.0.0 the replacement operator was in package
methods and had a different test for validity of name
.
These are internal generic operators: see InternalMethods.
Extract
, slot