[R] Building a big.matrix using foreach
Michael Knudsen
micknudsen at gmail.com
Mon Jul 20 10:23:22 CEST 2009
On Sun, Jul 19, 2009 at 4:02 PM, Michael Kane<kaneplusplus at gmail.com> wrote:
Hi Mike,
> desc = describe(x)
> foreach (i=1:nrow(x), .combine=c, .packages='bigmemory') %dopar%
> {
> x = attach.big.matrix(desc)
> f(x[i,])
> }
Thanks! The shared.big.matrix was exactly what I needed. It still
remains for me, though, to check if I run into memory problems anyway.
It doesn't seem as if there's a "don't return anything" option in the
foreach function (also mentioned in my previous post in this thread).
Best,
Michael
--
Michael Knudsen
micknudsen at gmail.com
http://lifeofknudsen.blogspot.com/
More information about the R-help
mailing list