PVM.rapply {rpvm}R Documentation

Parallel apply

Description

Apply a function to the rows of a matrix in parallel, via PVM.

Usage

PVM.rapply (X, FUN = mean, NTASK = 1)

Arguments

X a numeric matrix
FUN function to be applied on each row
NTASK number of tasks to use

Details

This function requires the function FUN can be correctly evaluated in each spawned R process.

Value

A vector with the same values as apply (X, 1, FUN).

Author(s)

Na (Michael) Li nali@umn.edu and A.J. Rossini rossini@u.washington.edu

Examples

a <- matrix(rnorm(100), nrow = 10)
## Not run: PVM.rapply (a, sum, 3)

[Package rpvm version 0.6-2 Index]