Re: [R] (Newbie)Basic Basic global vs. local variables

From: Alberto Monteiro <albmont_at_centroin.com.br>
Date: Mon 02 Apr 2007 - 19:33:09 GMT

Jim Holtman wrote:

>

> The following will work, but I would suggest that you redesign your
> functions so that they do not use 'globals'; It is not nice for functions
> to have side-effects.
>
Globals are Evil, but, like goto, sometimes they can make a big program become simpler. I don't see a nice alternative to globals when I have a huge database where a lot of different functions read and write.

But maybe this is ideology/religion/politics...

Alberto Monteiro



R-help@stat.math.ethz.ch 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 Tue Apr 03 05:37:03 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 02 Apr 2007 - 20:32:08 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.