R-alpha: scope +

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


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


PS.

On second thought, it would not bother me if 

  f<-function() {x[1]<-3;x}
  f()

produced an error message, since I wouldn't do this on purpose. Also,
a similar result occurs with

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

[[2]]
[1] 2

> x
[[1]]
[1] 3

[[2]]
[1] 2



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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-