Avoid argument duplication passed through (...)
Try modifyList
used as follows:
f <- function(x, ...) {
defaults <- list(xlab = "x", ylab = "y")
args <- modifyList(defaults, list(x = x, ...))
do.call("plot", args)
}
Try modifyList
used as follows:
f <- function(x, ...) {
defaults <- list(xlab = "x", ylab = "y")
args <- modifyList(defaults, list(x = x, ...))
do.call("plot", args)
}