[R] memory location of object?
mtmorgan at fhcrc.org
Mon Jan 10 22:12:32 CET 2011
On 01/10/2011 11:16 AM, maddox wrote:
> I haven't found a way to display the memory location of an object in R.
> Is there one? (I want to see whether some code 'grows' an object, and
> an ever-changing memory location for the object would presumably confirm
For what you ask
> x = 1:10; .Internal(inspect(x))
@b0d9c8 13 INTSXP g0c4 [NAM(1)] (len=10, tl=0) 1,2,3,4,5,...
but maybe you're looking for
> x = y = 1:10; tracemem(x); x = 1L
tracemem[0x923450 -> 0x9234a8]:
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Telephone: 206 667-2793
More information about the R-help