Re: [R] Is there lazy copy in R?

2009-12-15 Thread Peng Yu
On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham h.wick...@gmail.com wrote: I don't understand what these addresses mean. Would you please help me understand it? Did you try reading the documentation?     When an object is traced any copying of the object by the C     function ‘duplicate’

Re: [R] Is there lazy copy in R?

2009-12-15 Thread tlumley
On Wed, 16 Dec 2009, Peng Yu wrote: On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham h.wick...@gmail.com wrote: I don't understand what these addresses mean. Would you please help me understand it? Did you try reading the documentation?     When an object is traced any copying of the object

Re: [R] Is there lazy copy in R?

2009-12-15 Thread Peng Yu
2009/12/15 tlum...@u.washington.edu: On Wed, 16 Dec 2009, Peng Yu wrote: On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham h.wick...@gmail.com wrote: I don't understand what these addresses mean. Would you please help me understand it? Did you try reading the documentation?     When an

Re: [R] Is there lazy copy in R?

2009-12-15 Thread tlumley
On Tue, 15 Dec 2009, Peng Yu wrote: 2009/12/15 tlum...@u.washington.edu: On Wed, 16 Dec 2009, Peng Yu wrote: On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham h.wick...@gmail.com wrote: I don't understand what these addresses mean. Would you please help me understand it? Did you try

Re: [R] Is there lazy copy in R?

2009-12-15 Thread Peng Yu
On Tue, Dec 15, 2009 at 2:34 PM, Peng Yu pengyu...@gmail.com wrote: 2009/12/15  tlum...@u.washington.edu: On Wed, 16 Dec 2009, Peng Yu wrote: On Tue, Dec 15, 2009 at 10:32 PM, hadley wickham h.wick...@gmail.com wrote: I don't understand what these addresses mean. Would you please help me

[R] Is there lazy copy in R?

2009-12-14 Thread Peng Yu
I'm wondering if lazy copy is available in R or not. For example, in the following code, I'm wondering if the memory for y is allocated in the 2nd line or the 3rd line. Is there a documentation for this? x=1:1 y=x y[[10]]=5 __ R-help@r-project.org

Re: [R] Is there lazy copy in R?

2009-12-14 Thread Benilton Carvalho
use tracemem() to figure out... and read its documentation in detail. b On Dec 15, 2009, at 1:03 AM, Peng Yu wrote: I'm wondering if lazy copy is available in R or not. For example, in the following code, I'm wondering if the memory for y is allocated in the 2nd line or the 3rd line

Re: [R] Is there lazy copy in R?

2009-12-14 Thread Peng Yu
PM, Benilton Carvalho bcarv...@jhsph.edu wrote: use tracemem() to figure out... and read its documentation in detail. b On Dec 15, 2009, at 1:03 AM, Peng Yu wrote: I'm wondering if lazy copy is available in R or not. For example, in the following code, I'm wondering if the memory for y

Re: [R] Is there lazy copy in R?

2009-12-14 Thread hadley wickham
I don't understand what these addresses mean. Would you please help me understand it? Did you try reading the documentation? When an object is traced any copying of the object by the C function ‘duplicate’ or by arithmetic or mathematical operations produces a message to

Re: [R] Is there lazy copy in R?

2009-12-14 Thread Linlin Yan
It means that R does have the lazy copy mechanism, which I didn't know, and I think it can be very useful to make R running more quickly. On Tue, Dec 15, 2009 at 12:15 PM, Peng Yu pengyu...@gmail.com wrote: a=1:10 b=a a=1:10 tracemem(a)# I assume the following is address 'a' points to [1