Reconcile an argument list to any function signature.
Adapt an argument list to a function excluding arguments that will not be recognized by it, redundant arguments, and un-named arguments.
arg_reconcile( fun, ..., .args = alist(), .docall = FALSE, .include = c(), .exclude = c(), .remap = list(), .warn = TRUE, .error = "default", .finish = identity )
fun |
A function to which an argument list needs to be adapted. Use
the unquoted name of the function. If it's in a different
package then the fully qualified unquoted name (e.g.
|
... |
An arbitrary list of named arguments (unnamed ones will be
ignored). Arguments in |
.args |
A list or |
.docall |
If set to |
.include |
Whitelist. If not empty, only arguments named here will be
permitted, and only if they satisfy the conditions implied by
the other arguments. Evaluated before |
.exclude |
Blacklist. If not empty, arguments named here will be removed
even if they satisfy the conditions implied by the other
arguments. Evaluated before |
.remap |
An optional named character vector or named list of character
values for standardizing arguments that play the same role
but have different names in different functions. Evaluated
after |
.warn |
Whether to issue a warning message (default) when invalid arguments need to be discarded. |
.error |
If specified, should be the object to return in the event of
error. This object will have the error as its
|
.finish |
A function to run on the result before returning it. Ignored
if |
Either a named list or the result of calling fun
with the
supplied arguments
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.