I need to run a function of type
f <- function(...) {
l <- list(...)
l[["hortela"]]
}
x <- 'hortela'
If we do
f(hortela = 1)
We have the result 1
, which is what we expect.
How do I call f()
using x
instead of writing hortela
manually?
PS: I do not want to change the f()
.