[R] [R-pkgs] Package "ref" implements references and referenceable data.frames for the S-language
joehl at gmx.de
Mon Feb 23 17:16:51 CET 2004
Repeatedly people have asked how to pass arguments by reference in R.
Now package "ref" is on CRAN, which provides two referencing methods:
Functions ref(), deref() and friends conveniently allow to pass parameters
"by reference" instead of "by value". This can be useful in memory critical
applications but requires a more careful programming style to track the
implications of functions changing their parameters. However, package ref is
written in pure S and attaching this package does not change any standard S
Class refdata is a transparent wrapper to matrices and data.frames which
allows for memory efficient nested subsetting. I.e. you can create a subset
subset ... of a data.frame without duplicating the data in memory, instead
only indexing information is duplicated. Indexing information is represented
as positive or negative integers, whatever is shorter, thus the length of
index is granted to be <=nrows/2 resp. <=ncol/2. Memory savings in case of a
square data.frame is roughly n^2-n elements per level of nested subsetting.
This code is offered "as is" under the GPL, usage is completely at your own
risk. (Some efforts has been put in the included regression tests to make
the code does what it is intended to do).
Feedback about problems or successful example uses is welcome.
Please use the email address given in the package DESCRIPTION and please
don't cc to lists for spam prevention.
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++
R-packages mailing list
R-packages at stat.math.ethz.ch
More information about the R-help