R/parLapplySLB.R

Defines functions parLapplySLB

Documented in parLapplySLB

parLapplySLB <-
function(cl=NULL, x, size=1, fun, ...)
{
#    requireNamespace("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 July 10, 2023, 2:03 a.m.