Hello,

Consider:

f1 <- function(a, b, c, d, ...) {
  c(list(a = a, b = b, c = c, d = d), list(...))
}

> f1(a = 1, b = 2, c = 3, d = 4, more = 5)
$a
[1] 1

$b
[1] 2

$c
[1] 3

$d
[1] 4

$more
[1] 5


Question: I'm guessing there exists a function such that I don't have to list each bound argument separately in the list in 'f1'. It seems like it should be easy but it's escaping me.

Thanks,
Erik

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to