R/parLapplySLB.R

Defines functions parLapplySLB

Documented in parLapplySLB

parLapplySLB <- 
function(cl, x, size=1, fun, ...) 
{
    require(snow)
    fun <- match.fun(fun)
    m <- length(x)
    size <- rep(size, m)[1:m]
    id <- order(size, decreasing=TRUE)
    s <- x[id]
    id <- (1:m)[id]
    res <- clusterApplyLB(cl, s, fun, ...)
    res <- res[order(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.