[R] Macros versus functions
Murray Jorgensen
maj at stats.waikato.ac.nz
Fri Nov 8 01:31:01 CET 2002
Thanks, but now you've got me worried. I have an idea that it must have
been a vague memory of this article that inspired the question! Time for
a brain scan soon!
Murray Jorgensen
Huntsinger, Reid wrote:
> A nice article by Thomas Lumley on a sort of macro facility for
> R appeared in the R Newsletter a few issues ago:
> http://cran.r-project.org/doc/Rnews/Rnews_2001-3.pdf
>
> Reid Huntsinger
>
> -----Original Message-----
> From: Murray Jorgensen [mailto:maj at stats.waikato.ac.nz]
> Sent: Thursday, November 07, 2002 4:14 PM
> To: R-help
> Subject: [R] Macros versus functions
>
>
> R is a function-oriented language and functions have the advantage that
> they control unintended side effects of computations on the workspace.
> Still, there are times when I am using R when I want to make a large
> number of changes to the worksheet repeatedly and where the easiest way
> seems to be to keep pasting in the same chunk of code, or to put it on
> a file and use source("filename"). So effectively R does have macros as
> well as functions.
>
> Question: is the use of macros in this way 'bad practice' to be
> deprecated, and if so why? (If I decide that it is bad practice I will
> probably go on being bad, but I will try not to pass on bad habits to my
> students!)
>
> Murray
>
--
Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz Fax 7 838 4155
Phone +64 7 838 4773 wk +64 7 849 6486 home Mobile 021 395 862
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list