I am running a program which generates a few columns of several million rows, cbinds them, then prints. I'm trying to make the process more memory efficient, and wondering if the following copies data, or just points.
x<-rnorm(3,1,1)
y<-rnorm(3,2,2)
z<-rnorm(3,3,3)
M<-cbind(x,y,z)
One of these answers Understanding exactly when a data.table is a reference to (vs a copy of) another data.table hints that the data is not copied, but the command .Internal(inspect(M)) seems to disagree.
A simple memory solution would be to declare M before running the fi and declare the values into M. I've heard that data.tables can very efficiently hold large data sets. Is there some way to use one in this situation?