PVM.rapply {rpvm} | R Documentation |
Apply a function to the rows of a matrix in parallel, via PVM.
PVM.rapply (X, FUN = mean, NTASK = 1)
X |
a numeric matrix |
FUN |
function to be applied on each row |
NTASK |
number of tasks to use |
This function requires the function FUN
can be correctly
evaluated in each spawned R process.
A vector with the same values as apply (X, 1, FUN)
.
Na (Michael) Li nali@umn.edu and A.J. Rossini rossini@u.washington.edu
a <- matrix(rnorm(100), nrow = 10) ## Not run: PVM.rapply (a, sum, 3)