[R] Question about <<- assignment

Hsiu-Khuern Tang hsiu-khuern.tang at hp.com
Thu Jul 2 02:20:30 CEST 2009


Is this expected behavior?

> z <- 1:5
> z[1] <<- 0
Error in z[1] <<- 0 : object "z" not found

The documentation seems to suggest that z will be found in the global
environment and modified accordingly.

Best,
Hsiu-Khuern.




More information about the R-help mailing list