[Rd] SEXPs and slots

Simon Urbanek simon.urbanek at r-project.org
Tue Nov 16 21:46:29 CET 2010


On Nov 16, 2010, at 8:52 PM, Patrick Leyshock wrote:

> Revisiting the output below:
> 
> 1.  Am I correct in thinking that the @XXXXXXX items are addresses?

yes


> 2.  What are the meanings of the gXcX items?

you should not worry about those - they are internal flags related to the garbage collector (generation and class).


> 3.  Does one ever see NAM[0]?
> 

no, if NAMED==0 the NAM(x) output is omitted, e.g.:

> .Internal(inspect(1L+1L))
@102b1bd18 13 INTSXP g0c1 [] (len=1, tl=1) 2



> Thanks, Patrick
> 
>> .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)] "id"
>>   @c0f6178 16 STRSXP g0c1 [NAM(2)] (len=1, tl=0)
>>     @12341c80 09 CHARSXP g0c2 [gp=0x20] "id_value"
>>   TAG: @607ce8 01 SYMSXP g1c0 [MARK,NAM(2),gp=0x4000] "class"
>>   @c0f6d58 16 STRSXP g0c1 [NAM(2),ATT] (len=1, tl=0)
>>     @96ed08 09 CHARSXP g1c1 [MARK,gp=0x21] "example"
>>   ATTRIB:
>>     @df70fd0 02 LISTSXP g0c0 []
>>       TAG: @624f70 01 SYMSXP g1c0 [MARK,NAM(2)] "package"
>>       @c0f6d88 16 STRSXP g0c1 [NAM(2)] (len=1, tl=0)
>>         @67f5e0 09 CHARSXP g1c2 [MARK,gp=0x21,ATT] ".GlobalEnv"
>> 
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



More information about the R-devel mailing list