omxLapply: On-Demand Parallel Lapply

View source: R/MxApply.R

omxLapplyR Documentation

On-Demand Parallel Lapply

Description

If the snowfall library is loaded, then this function calls sfLapply. Otherwise it invokes lapply.

Usage

omxLapply(x, fun, ...)

Arguments

x

a vector (atomic or list) or an expressions vector. Other objects (including classed objects) will be coerced by as.list.

fun

the function to be applied to each element of x.

...

optional arguments to fun.

See Also

omxApply, omxSapply

Examples


x <- list(a = 1:10, beta = exp(-3:3), logic = c(TRUE,FALSE,FALSE,TRUE))
# compute the list mean for each list element
omxLapply(x,mean)


OpenMx documentation built on Oct. 19, 2024, 9:06 a.m.