[R] Variable scope in functions - best practices

Dieter Menne dieter.menne at menne-biomed.de
Mon Jul 25 20:31:25 CEST 2011

Noah Silverman wrote:
> I have several "global" variables that I want to change with a given
> function.  (The variable has a different value after the function is
> called.)

Berend Hasselman wrote:
> Maybe this helps
> ?`<<-`

It helps to get the job done, but the OP asked for "best practices", which
it is definitively not. You might check the docs for "assign" or search the
list for this term (<<- searching is difficult) to finde a more fine-grained
alternative within an explicit environment.


View this message in context: http://r.789695.n4.nabble.com/Variable-scope-in-functions-best-practices-tp3690026p3693582.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list