Within a function, how can I extract the value of an argument from the ellipsis, without evaluating any other arguments in the ellipsis?
Concretely, how would I modify the body of this function to return "get me" from the call below?
foo <- function(...) {
if (hasArg(bar)) {
list(...)[["bar"]]
}
}
foo(bar = paste("get", "me"), baz = oops)
#> Error in foo(bar = paste("get", "me"), baz = oops): object 'oops' not found