[R] Access to values of function arguments

willemf jwhferguson at zoology.up.ac.za
Sun Jul 20 15:42:53 CEST 2008


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.



More information about the R-help mailing list