[R] Scope?
Göran Broström
gb at stat.umu.se
Sun Feb 10 00:33:20 CET 2002
I find the following behaviour slightly disturbing:
> x = 6
> ex = function(x = x) x
> ex()
Error in ex() : recursive default argument reference
Can't R distinguish between formal and actual arguments? (Just kidding!)
Seriously, what bad things could happen if I was allowed to get the
answer 6 here?
Göran
--
Göran Broström tel: +46 90 786 5223
professor fax: +46 90 786 6614
Department of Statistics http://www.stat.umu.se/egna/gb/
Umeå University
SE-90187 Umeå, Sweden e-mail: gb at stat.umu.se
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list