Create a usable list of default arguments to a function
Source:R/matsindf_apply.R
get_useable_default_args.Rd
formals(FUN)
does not handle arguments without a default well,
returning a name
vector of length 1
,
which when converted to character is "".
This function detects that condition and replaces the no-default argument with
the value of .no_default
, by default NULL
.
Usage
get_useable_default_args(FUN, which = c("values", "names"), no_default = NULL)
Arguments
- FUN
A function from which values of default arguments are to be extracted.
- which
Tells whether to get "names" of arguments or "values" of arguments. Default is "values".
- no_default
The placeholder value for arguments with no default.