On Mon, 25 Oct 2004 [EMAIL PROTECTED] wrote:
Full_Name: Boris Vaillant Version: 2.0 OS: Win 2000 Submission from: (NULL) (195.227.11.98)
##Maybe I have not fully understood the changements ##in R 2.0. ## Why is it that
a <- 1:3 names(a) <- 1:3 # works fine, but
b <<- 1:3 names(b) <<- 1:3
## used to work in R 1.9 ## and givesError: Object "b" not found## in R 2.0 ?
It was a bug in R 1.9.1 that this worked when typed at the top level. <<- is for use inside functions, eg:
f<-function(x){
b <<- x names(b) <<- x }
f(1:3) b
1 2 3 1 2 3
-thomas
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel