Hi there!

I have become a big fan of the 'foreach' package allowing me to do a
lot of stuff in parallel. For example, evaluating the function f on
all elements in a vector x is easily accomplished:

foreach(i=1:length(x),.combine=c) %dopar% f(x[i])

Here the .combine=c option tells foreach to combine output using the
c()-function. That is, to return it as a vector.

Today I discovered the 'bigmemory' package, and I would like to
contruct a big.matrix in a parralel fashion row by row. To use foreach
I see no other way than to come up with a substitute for c in the
.combine option. I have checked out the big.matrix manual, but I can't
find a function suitable for just that.

Actually, I wouldn't even know how to do it for a usual matrix. Any clues?

Thanks!

-- 
Michael Knudsen
micknud...@gmail.com
http://lifeofknudsen.blogspot.com/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to