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.

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)