I want to fill a vector through a function, that vector being global in my code:
## The vector
x = c( NA, NA, NA )
## changing its value
x[1] <- 1 # fine
x[1] <<- 1 # not fine
Error in x[1] <<- 1 : object 'x' not found
That must be some very basic R, I cannot see however how to have that value stored globally.