R/get_globals_and_packages_xapply.R
get_globals_and_packages_xapply.Rd
Identify Globals and Packages of a Map-Reduce Function Call
get_globals_and_packages_xapply(
fun,
fun_name = as.character(substitute(fun)),
args = NULL,
args_name = "...",
globals = TRUE,
packages = NULL,
envir = parent.frame()
)
A function that takes one or more arguments.
The name of the argument that fun
should be passed
as.
(optional) A list of arguments passed to fun
, either via
a named argument (args_name
), or via ....
If "..."
, then the arguments in args
are passed
to fun()
as individual arguments. If a string, then args
as
passed to fun()
via the argument of this name.
(optional) a logical, a character vector, a named list, or a Globals object. If TRUE, globals are identified by code inspection based on expr
and tweak
searching from environment envir
. If FALSE, no globals are used. If a character vector, then globals are identified by lookup based their names globals
searching from environment envir
. If a named list or a Globals object, the globals are used as is.
(optional) a character vector specifying packages to be attached in the R environment evaluating the future.
The environment from where globals should be searched.
A names list with elements:
globals
- a FutureGlobals object
packages
- a character vector of package names