[R] memory location of object?
Martin Morgan
mtmorgan at fhcrc.org
Mon Jan 10 22:12:32 CET 2011
On 01/10/2011 11:16 AM, maddox wrote:
>
> Hi,
>
> 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
> this)
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[1] = 1L
[1] "<0x923450>"
tracemem[0x923450 -> 0x9234a8]:
Martin
>
> Thanks
>
> m
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the R-help
mailing list