R is pretty smart about duplicating only when necessary. That is,
arguments passed to a function are copy-on-write. Also, I think (someone
more knowledgeable please correct if I'm wrong) it may be better to use
the data frame, which is just a list internally, because if you only
modify one column,
If you don't modify the data frame in your function it won't
physically make a new copy.
On Mon, May 24, 2010 at 10:29 AM, wrote:
> I understand that everything passed to an R function is passed "by
> value". This would seem to include data frames, which my current
> application uses heavily, b
I understand that everything passed to an R function is passed "by
value". This would seem to include data frames, which my current
application uses heavily, both for storing program inputs, and holding
intermediate and final results. In trying to get greater performance
out of my R code, I am wo
3 matches
Mail list logo