[R] Access to values of function arguments

From: willemf <jwhferguson_at_zoology.up.ac.za>
Date: Sun, 20 Jul 2008 06:42:53 -0700 (PDT)

Does anyone know of good reading material about the following? The R language definition does not appear to explicitly address my problem (maybe I misread that document?)

I have a function definition:

func(a)
  cat("Anova for variable ",a)

What I wish to achieve is to call func with a value such as: func(Age)

and then obtain:

Anova for variable Age

Using "names(formals())" inside function func yields "a". That is not what I need. I need the name contained in a, which in this case is Age.

Thanks for your time.
Willemf

-- 
View this message in context: http://www.nabble.com/Access-to-values-of-function-arguments-tp18554602p18554602.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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 20 Jul 2008 - 15:49:23 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 20 Jul 2008 - 16:31:53 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.

list of date sections of archive