Skip to content
Prev 36 / 2152 Next

Using snow on a looping structure

Hi Gang --

"Gang Chen" <gangchen6 at gmail.com> writes:
I think what you want is along the lines of
and then as you guessed
[1] TRUE

so for your example, I'd guess

runStat <- parApply(cl, rData, c(1,2,3), runAna, Model=Model)

This is not quite what you want -- the 'result' dimension is the first
rather than last
[1] 2 3 4 5
[1] 2 2 3 4

array-munging is not a speciality of mine, but a simple work-around is
to reorder the dimensions of the original array, so you're applying
to, and writing in, the slice indexed by the first entry
[1] 5 2 3 4
[1] 2 2 3 4
Hope that helps,

Martin