f <- function(...) {
out <- list2(...)
rev(out)
}
# Trailing commas are ignored
f(this = "that", )
# Splice lists of arguments with `!!!`
x <- list(alpha = "first", omega = "last")
f(!!!x)
# Inject a name using glue syntax
if (is_installed("glue")) {
nm <- "key"
f("{nm}" := "value")
f("prefix_{nm}" := "value")
}
Run the code above in your browser using DataLab