Re: [R] Creating R packages, passing by reference and oo R.

2010-04-05 Thread Sharpie
Gabor Grothendieck wrote: > > Passing by value does not necessarily mean physical copying. Check out > this: > >> x <- matrix(1:1000^2, 1000, 1000) >> gc() > used (Mb) gc trigger (Mb) max used (Mb) > Ncells 114520 3.1 35 9.4 35 9.4 > Vcells 577124 4.51901092 14.6

Re: [R] Creating R packages, passing by reference and oo R.

2010-04-05 Thread Gabor Grothendieck
Passing by value does not necessarily mean physical copying. Check out this: > x <- matrix(1:1000^2, 1000, 1000) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 114520 3.1 35 9.4 35 9.4 Vcells 577124 4.51901092 14.6 1577448 12.1 > f <- function(x) { y <- max(

Re: [R] Creating R packages, passing by reference and oo R.

2010-04-05 Thread Duncan Murdoch
On 05/04/2010 7:35 AM, Roger Gill wrote: Dear All, I would like some advice on creating R packages, passing by reference and oo R. I have created a package that is neither elegant nor extensible and rather cumbersome (it works). I would like to re write the code to make the package distributa

[R] Creating R packages, passing by reference and oo R.

2010-04-05 Thread Roger Gill
Dear All, I would like some advice on creating R packages, passing by reference and oo R. I have created a package that is neither elegant nor extensible and rather cumbersome (it works). I would like to re write the code to make the package distributable (should it be of interest) and easy to