Re: [R] generating list of all arguments that function was called with

2010-07-02 Thread Marc Schwartz
On Jul 2, 2010, at 3:01 PM, Erik Iverson wrote: > 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 > >

[R] generating list of all arguments that function was called with

2010-07-02 Thread Erik Iverson
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 argume