Displaying 2 results from an estimated 2 matches for "df70e48".
Did you mean:
d47fe48
2010 Nov 12
1
SEXPs and slots
Hello,
I've created this class:
setClass("example",
representation (
size = "numeric",
id = "character"
)
)
Suppose I create a new instance of this class:
> x <- new("example", 4, "id_value")
This creates an S4 object with two slots. Am I correct in thinking that
slots are "filled" by SEXPs?
2010 Nov 15
1
SEXP and slots
...r "id_value"
>>
>> so the @size slot is a numeric vector of length 1 containing the value
>> 4. One doesn't really have to know the detailed representation, but one
>> can find out from
>>
>> > .Internal(inspect(eg))
>> @df70e48 25 S4SXP g0c0 [OBJ,NAM(2),gp=0x10,ATT]
>> ATTRIB:
>> @df70ef0 02 LISTSXP g0c0 []
>> TAG: @769258 01 SYMSXP g1c0 [MARK] "size"
>> @c0f6db8 14 REALSXP g0c1 [NAM(2)] (len=1, tl=0) 4
>> TAG: @15b0228 01 SYMSXP g1c0 [MARK,NAM(2)] &quo...