Possible Duplicate:
using substitute to get argument name with
Note that this is -different- from getting the vectors themselves with list(...)
or something of that form. What I'd like to be able to do is simply 'echo' all arguments passed into ...
, before any parsing is done.
Eg: I want a function that might act simply like:
f(apple, banana, car)
## --> returns c("apple", "banana", "car"),
## ie, skips looking for the objects apple, banana, car
The closest I've gotten is
f <- function(...) {
return( deparse( substitute( ... ) ) )
}
but this only returns the first argument 'caught' by the ...
. Thoughts?