Lightweight helper to extract a single named argument from a list (typically
list(...)). If the argument is not present, a default value is
returned.
See also
For extracting several arguments
at once use extractArgs().
Other pkg.args:
callIf(),
extractArgs(),
mergeArgs(),
recycle()
Examples
f <- function(...) {
dots <- list(...)
getDotsArg(dots, "col", default = "black")
}
f(col = "red", lwd = 2)
#> [1] "red"
f(lwd = 2)
#> [1] "black"
