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)
}

Try the pbapply package in your browser

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

pbapply documentation built on July 9, 2023, 7:41 p.m.