[R] Obtaining names of further arguments ('...')

From: Arne Henningsen <ahenningsen_at_email.uni-kiel.de>
Date: Sun, 9 Dec 2007 14:28:17 +0100


Hi,

I would like to obtain the names of all objects that are provided as further arguments ("...") in a function call. I have created a minimal example that illustrates my wish (but isn't useful otherwise):

f1 <- function( ... ) return( deparse( substitute( ... ) ) )

x1 <- 1
x2 <- 2
x3 <- 3

f1( x1, x2, x3 )
[1] "x1"

However, I would like to obtain the names of *all* further arguments, i.e. "x1", "x2", and "x3".

Is this possible in R? Does anybody know how to do this?

Thanks,
Arne

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445 or +49-4349-914871
Fax: +49-431-880 1397
ahenningsen_at_agric-econ.uni-kiel.de
http://www.uni-kiel.de/agrarpol/ahenningsen/

______________________________________________
R-help_at_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.
Received on Sun 09 Dec 2007 - 13:45:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Dec 2007 - 14:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.