R/future_Map.R

Defines functions future_Map

Documented in future_Map

#' @inheritParams future_mapply
#' 
#' @param f A function of the arity \eqn{k} if `future_Map()` is called with
#' \eqn{k} arguments. 
#' 
#' @return
#' `future_Map()` is a simple wrapper to `future_mapply()` which does not
#' attempt to simplify the result.
#' See [base::Map()] for details.
#'
#' @export
#'
#' @author
#' The implementations of `future_Map()` is adopted from the source code
#' of the corresponding base \R function `Map()`, which is licensed under
#' GPL (>= 2) with 'The R Core Team' as the copyright holder.
#' 
#' @rdname future_mapply
future_Map <- function(f, ..., future.envir = parent.frame(), future.label = "future_Map-%d") {
  f <- match.fun(f)
  future_mapply(FUN = f, ..., SIMPLIFY = FALSE, future.envir = future.envir, future.label = future.label)
}

Try the future.apply package in your browser

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

future.apply documentation built on May 31, 2023, 8:11 p.m.