Skip to content
Prev 44502 / 398528 Next

pass by reference -- how to do it

For the record, be careful: <<- does not necessarily assign to 
the global environment. In R ` x <<- value` assigns `value` to 
the first instance of `x` it can find using lexical scoping. Only if it 
doesn't find any such variable, it will indeed create an `x` 
in .GlobalEnv.

Tricky for those brought up on S-Plus, where assignment <<- 
is guaranteed to assign to frame 1. 

HTH
http://www.R-project.org/posting-guide.html

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html  
 
Simon Fear 
Senior Statistician 
Syne qua non Ltd 
Tel: +44 (0) 1379 644449 
Fax: +44 (0) 1379 644445 
email: Simon.Fear at synequanon.com 
web: http://www.synequanon.com 
  
Number of attachments included with this message: 0 
  
This message (and any associated files) is confidential and\...{{dropped}}