[R] Is there lazy copy in R?

Benilton Carvalho bcarvalh at jhsph.edu
Tue Dec 15 04:23:04 CET 2009


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. Is there a documentation for this?
> 
> x=1:10000
> y=x
> y[[10]]=5
> 
> ______________________________________________
> 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.




More information about the R-help mailing list