Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

doCall

Executes a function call with option to ignore unused arguments


Description

Executes a function call with option to ignore unused arguments.

Usage

## Default S3 method:
doCall(.fcn, ..., args=NULL, alwaysArgs=NULL, .functions=list(.fcn),
  .ignoreUnusedArgs=TRUE, envir=parent.frame())

Arguments

.fcn

A function or a character string specifying the name of a 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.

.functions

A list of function:s or names of functions. This can be used to control which arguments are passed.

.ignoreUnusedArgs

If TRUE, arguments that are not accepted by the function, will not be passed to it. Otherwise, all arguments are passed.

envir

An environment in which to evaluate the call.

Author(s)

Henrik Bengtsson

See Also

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"))

R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.