[R] Why is vector assignment in R recreates the entire vector ?

Norm Matloff matloff at cs.ucdavis.edu
Thu Sep 2 21:20:44 CEST 2010


Tal wrote:

> A friend recently brought to my attention that vector assignment actually
> recreates the entire vector on which the assignment is performed.
...

I brought this up in r-devel a few months ago.  You can read my posting,
and the various replies, at

http://www.mail-archive.com/r-devel@r-project.org/msg20089.html

Some of the replies not only explain the process, but list lines in the
source code where this takes place, enabling a closer look at how/when
duplication occurs. 

Norm Matloff



More information about the R-help mailing list