"Jens Oehlschlägel"
2004-Feb-23 16:16 UTC
[R] [R-pkgs] Package "ref" implements references and referenceable data.frames for the S-language
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 behaviour. 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 of a 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 the 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 shure 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. Best regards Jens Oehlschl?gel -- 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 https://www.stat.math.ethz.ch/mailman/listinfo/r-packages
Seemingly Similar Threads
- Package "ref" implements references and referenceable data.frames for the S-language
- I thank you for the spam i got returned
- consensus trees/groups from clustering
- Samba 3.0.2 ADS Member - Failed to verify incoming ticket!
- Warning for data.table (with ref)?