R/sirt_parlapply.R

Defines functions sirt_parlapply

## File Name: sirt_parlapply.R
## File Version: 0.02

sirt_parlapply <- function(cl, X, FUN, verbose=FALSE, ...)
{
    args <- list(...)
    args$cl <- cl
    args$X <- X
    if (verbose){
        what <- pbapply::pblapply
        args$FUN <- FUN
    } else {
        what <- parallel::parLapply
        args$fun <- FUN
    }
    res_all <- do.call(what=what, args=args)
    return(res_all)
}

Try the sirt package in your browser

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

sirt documentation built on Aug. 11, 2023, 5:07 p.m.