Hello,

I'm a newbie to R, I have a quesiton.

I'm a bit confused on global variable assignments.

 I have the following situation. I have 2 global variables current_idx and
previous_idx. *These 2 global variables have to be set by a method in a
reference class*.

Essentially, using <<- assignment operator should work right ? But, I get
this warning

Non-local assignment to non-field names (possibly misspelled?)

Where am I going wrong ?

Will assign(current_idx, index, envir = .GlobalEnv) work ?


Thanks !

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to