[R] Access to values of function arguments

2008-07-20 Thread willemf
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

Re: [R] Access to values of function arguments

2008-07-20 Thread Prof Brian Ripley
See ?deparse . E.g. (with several stylistic improvements) func - function(a) cat(sprintf(Anova for variable %s\n, sQuote(deparse(substitute(a) func(Age) Note that you expliciltly do not want the *vaiue* of 'a', but the symbol passed. That is non-standard behaviour, and you

Re: [R] Access to values of function arguments

2008-07-20 Thread Marc Schwartz
on 07/20/2008 08:42 AM willemf wrote: 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

Re: [R] Access to values of function arguments

2008-07-20 Thread willemf
Dear Mike and Brian, Thank you very much, this solves my immediate problem. Thanks for your time very much. I will do the reading on those two functions. I have looked for books that deal with the more programmatic aspects of R instead of the statistical side (e.g. dealing with R objects,

Re: [R] Access to values of function arguments

2008-07-20 Thread jim holtman
Check out S Programming by Venables Ripley. On Sun, Jul 20, 2008 at 3:02 PM, willemf [EMAIL PROTECTED] wrote: Dear Mike and Brian, Thank you very much, this solves my immediate problem. Thanks for your time very much. I will do the reading on those two functions. I have looked for books