Re: [R] Variable scope in functions - best practices

2011-07-25 Thread Dieter Menne
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

[R] Variable scope in functions - best practices

2011-07-24 Thread Noah Silverman
Hi, I'm working on coding some more complex things in R and have need to break much of the logic into functions. 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.) In other languages like C, this is

Re: [R] Variable scope in functions - best practices

2011-07-24 Thread Berend Hasselman
Noah Silverman wrote: Hi, I'm working on coding some more complex things in R and have need to break much of the logic into functions. 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.) In

[R] Variable scope in functions - best practices

2011-07-24 Thread Noah Silverman
Hi, I'm working on coding some more complex things in R and have need to break much of the logic into functions. 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.) In other languages like C, this is

Re: [R] Variable scope in functions - best practices

2011-07-24 Thread Enrico Schumann
-help@r-project.org Betreff: [R] Variable scope in functions - best practices Hi, I'm working on coding some more complex things in R and have need to break much of the logic into functions. I have several global variables that I want to change with a given function. (The variable has

Re: [R] Variable scope in functions - best practices

2011-07-24 Thread Thomas Lumley
On Mon, Jul 25, 2011 at 4:14 AM, Noah Silverman noahsilver...@ucla.edu wrote: Hi, I'm working on coding some more complex things in R and have need to break much of the logic into functions. I have several global variables that I want to change with a given function.  (The variable has a