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

From: Alberto Monteiro <>
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 mailing list PLEASE do read the posting guide 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 Please read the posting guide before posting to the list.