[R] getting multiple argument names

whizvast whizvast at gmail.com
Fri Jun 27 17:48:26 CEST 2008

hi, all-

i wrote a function that accept multiple arguments, but don't know how to
assign names automatically. run the following code:

foo <- function (...) {
  x = list(...)
  names(x) <- deparse(substitute(...))
a = 1; b = 2; c = 3
y <- foo( a, b, c)

as you can see, only the first items are correctly named. 
how do i correct this problem?

View this message in context: http://www.nabble.com/getting-multiple-argument-names-tp18158010p18158010.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list