Re: [R] Macro variable substitution

2009-09-30 Thread Greg Snow
There was a rather in depth article on doing macros in R in the R newsletter a couple of years ago. There is also the defmacro function in the gtools package based on that article that can make the job easier for many cases. See fortune(236) before taking the assign route. -- Gregory (Greg) L

Re: [R] Macro variable substitution

2009-09-29 Thread Erik Iverson
One option, see ?assign and write a wrapper around it, using the "pos" argument. > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of David Young > Sent: Tuesday, September 29, 2009 10:58 AM > To: r-help@r-project.org > Subject:

Re: [R] Macro variable substitution

2009-09-29 Thread baptiste auguie
Hi, I guess you want ?assign See also this page for a working example, http://wiki.r-project.org/rwiki/doku.php?id=guides:assigning-variable-names HTH, baptiste 2009/9/29 David Young : > Hello All, > > I'm a new R user and have a question about what in SAS would be called > macro variable sub