[R] external variable by inside-function routines modifications

devol sunduck at gmail.com
Thu Oct 8 19:14:41 CEST 2009

Dear all,

  could you please advice whether it is possible somehow to modify an
external (from the point of some function view) variable by some
function-internal operators. For example

> var=1
> foo<-function(var){var=var+1}
> foo(var)
> var
[1] 1

but the goal is to get the var equal to 2 in this specific case.

View this message in context: http://www.nabble.com/external-variable-by-inside-function-routines-modifications-tp25803308p25803308.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list