doCall
From R.utils v1.4.2
by Henrik Bengtsson
Executes a function call with option to ignore unused arguments
Executes a function call with option to ignore unused arguments.
- Keywords
- programming
Usage
## S3 method for class 'default':
doCall(.fcn, ..., args=NULL, alwaysArgs=NULL, .functions=.fcn, .ignoreUnusedArgs=TRUE)
Arguments
- .fcn
- A
character
string naming the function to be called. - ...
- Named arguments to be passed to the function.
- args
- A
list
of additional named arguments that will be appended to the above arguments. - alwaysArgs
- A
list
of additional named arguments that will be appended to the above arguments and that will never be ignore. This is useful if you want to pass arguments to a function that accepts - .functions
- A
character
vector
of function names whos arguments should be kept. This is useful when one function passes...
to another, e.g - .ignoreUnusedArgs
- If
TRUE
, arguments that are not accepted by the function, will not be passed to it. Otherwise, all arguments are passed.
See Also
do.call
().
Examples
doCall("plot", x=1:10, y=sin(1:10), col="red", dummyArg=54,
alwaysArgs=list(xlab="x", ylab="y"),
.functions=c("plot", "plot.xy"))
Community examples
Looks like there are no examples yet.