[R] Avoiding deep copies
Johann Petrak
johann at ai.univie.ac.at
Tue Oct 2 14:21:51 CEST 2001
Is it correct that there is no way of avoiding deep copying
of data structures? Or asked from a different perspective,
is it true that there are no pointers? :)
(not that I am a fan of pointer, they just let me
decide when to do deep copy on my own when the
memory manager doesnt do it for me :) )
I was considering writing code in R that would need
the internal representation of complex graph structures
where several nodes in the graph point to the same
huge array of data.
Now, obviously one cannot just do something like
attr(thenode,"mydatavec")<-thedatavec or
thenode$mydatavec<-thedatavec
since all the data in thedatavec will be copied
with this assignment.
Are there commonly accepted/used workarounds?
Johann
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list