Call a function with the given arguments. Unnamed arguments are expected to
be lists containing further argument assignments. Multiple argument lists
are merged using arglist
in the order of their appearence.
callWith(FUN, ...)
FUN | function to be called |
---|---|
... | (unnamed) lists containing argument assignments passed to
|
the return value is the return value of the function FUN
.
# define some default arguments args.default <- list(xlim = c(0, 10), ylim = c(0, 10), col = "red", lwd = 2) # call plot with the default arguments callWith(plot, x = 1:10, args.default)# call plot with the default arguments but override the colour callWith(plot, x = 1:10, args.default, col = "blue")