getLocalArgsFor: Find sources for arguments in arbitrary function(s)

View source: R/MapOrDoCall.R

getLocalArgsForR Documentation

Find sources for arguments in arbitrary function(s)

Description

Search among local objects (which will often be arguments passed into a function) as well as dot objects to match the formals needed by fn. If localFormalArgs is named, then it will match the formal (name of localFormalArgs) with the local object, e.g., localFormalArgs = c(x = "obj") will find the object in the local environment called "obj", and this will be found because it matches the x argument in fn.

Usage

getLocalArgsFor(fn, localFormalArgs, envir, dots)

Arguments

fn

Function name(?)

localFormalArgs

A (named) character vector or arguments to

envir

The environment in which to (???)

dots

TODO: need description

Value

List of named objects. The names are the formals in fn, and the objects are the values for those formals. This can easily be passed to do.call(fn, args1)


PredictiveEcology/pemisc documentation built on Sept. 19, 2022, 7 p.m.