powered by
If the snowfall library is loaded, then this function calls sfSapply. Otherwise it invokes sapply.
sfSapply
sapply
omxSapply(x, fun, ..., simplify = TRUE, USE.NAMES = TRUE)
a vector (atomic or list) or an expressions vector. Other objects (including classed objects) will be coerced by as.list.
as.list
the function to be applied to each element of x.
x
optional arguments to fun.
fun
logical; should the result be simplified to a vector or matrix if possible?
logical; if TRUE and if x is a character, use x as names for the result unless it had names already.
TRUE
names
omxApply, omxLapply
omxApply
omxLapply
x <- list(a = 1:10, beta = exp(-3:3), logic = c(TRUE,FALSE,FALSE,TRUE)) # compute the list mean for each list element omxSapply(x, quantile)
Run the code above in your browser using DataLab