omxApply {OpenMx} | R Documentation |
On-Demand Parallel Apply
Description
If the snowfall library is loaded, then this function calls sfApply
. Otherwise it invokes apply
.
Usage
omxApply(x, margin, fun, ...)
Arguments
x |
a vector (atomic or list) or an expressions vector. Other objects (including classed objects) will be coerced by |
margin |
a vector giving the subscripts which the function will be applied over. |
fun |
the function to be applied to each element of |
... |
optional arguments to |
See Also
Examples
x <- cbind(x1 = 3, x2 = c(4:1, 2:5))
dimnames(x)[[1]] <- letters[1:8]
omxApply(x, 2, mean, trim = .2)
[Package OpenMx version 2.21.11 Index]