powered by
If the snowfall library is loaded, then this function calls sfApply. Otherwise it invokes apply.
sfApply
apply
omxApply(x, margin, fun, ...)
a vector (atomic or list) or an expressions vector. Other objects (including classed objects) will be coerced by as.list.
as.list
a vector giving the subscripts which the function will be applied over.
the function to be applied to each element of x.
x
optional arguments to fun.
fun
omxLapply, omxSapply
omxLapply
omxSapply
x <- cbind(x1 = 3, x2 = c(4:1, 2:5)) dimnames(x)[[1]] <- letters[1:8] omxApply(x, 2, mean, trim = .2)
Run the code above in your browser using DataLab