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) Thanks m -- View this message in context: http://r.789695.n4.nabble.com/memory-location-of-object-tp3207798p3207798.html Sent from the R help mailing list archive at Nabble.com.
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
?object.size -- Bert On Mon, Jan 10, 2011 at 11:16 AM, maddox <matthewgdodds at hotmail.com> 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) > > Thanks > > m > -- > View this message in context: http://r.789695.n4.nabble.com/memory-location-of-object-tp3207798p3207798.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Bert Gunter Genentech Nonclinical Biostatistics