R/parLapplySB.R

Defines functions parLapplySB

Documented in parLapplySB

parLapplySB <- 
function(cl, x, size = 1, fun, ...)
{
    require(snow)
    fun <- match.fun(fun)
    s <- clusterSplitSB(cl, x, size)
    id <- clusterSplitSB(cl, 1:length(x), size)
    res <- clusterApply(cl, s, lapply, fun, ...)
    res <- docall(c, res)
    res <- res[order(unlist(id))]
    res
}

Try the dclone package in your browser

Any scripts or data that you put into this service are public.

dclone documentation built on May 2, 2019, 6:08 p.m.