R-alpha: scope

Paul Gilbert (pgilbert@bank-banque-canada.ca)
Tue, 28 May 1996 10:03:35 -0400


Date: Tue, 28 May 1996 10:03:35 -0400
From: pgilbert@bank-banque-canada.ca (Paul Gilbert)
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: scope
Message-Id: <96May28.095035edt.29450@mailgate.bank-banque-canada.ca>


>> x<-c(1,2)
>> f<-function() {x[1]<-3;x}
>> f()
>[1] 3 2
>> x
>[1] 3 2

This result reported by Luke Tierney seems also to happen in R0.7 under
Solaris. I would expect this with <<- (which I don't use much), but not
with <- in the function. I hope this is considered to be a bug, not a
feature. It will sure mess up a lot of things I do.

Paul
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-