R/pbeapply.R

Defines functions pbeapply

Documented in pbeapply

pbeapply <- function(env, FUN, ..., 
all.names = FALSE, USE.NAMES = TRUE, cl = NULL) {
    FUN <- match.fun(FUN)
    # adapted from future.apply::future_eapply
    names <- ls(envir = env, all.names = all.names, sorted = FALSE)
    X <- mget(names, envir = env, inherits = FALSE)
    if (!USE.NAMES)
        names(X) <- NULL
    pblapply(X = X, FUN = FUN, ..., cl = cl)
}
psolymos/pbapply documentation built on Sept. 10, 2023, 7:21 p.m.