Re: [R] global variables in a function

2009-12-10 Thread Gray Calhoun
Hi Keith, A more specific example of what you're looking for might be helpful--ie do you want to read global variables or set them? You probably want to look at environments and closures; ?"<<-" and ?assign are good starting points (the latter has an example of "Global Assignment within a function

Re: [R] global variables in a function

2009-12-10 Thread Gabor Grothendieck
I think you are looking for a macro facility. See defmacro in gtools which is based on Thomas Lumley's function of the same name whose article you can find in back issues of R News. On Thu, Dec 10, 2009 at 11:00 AM, Keith Jones wrote: > Y'all, > > I would like to have most of the variables in m

[R] global variables in a function

2009-12-10 Thread Keith Jones
Y'all, I would like to have most of the variables in my function to be global instead of local. I have not found any references that tell me now to do that. If I have missed a reference please excuse me and tell me what I have missed. Thanks, Keith Jones __