Quoth Mark Wardle on Prickle-Prickle, Chaos 14, 3174:
> I can see that f(b <- 10) is equivalent to f(assign("b"), 10))

f(assign("b", 10))?

My undestanding is that assign applies to the parental environment;
but the return value of assign, namely 10, is passed to f as the local
variable a.

The default value b = 4 then overrides the parental environment since
it is unspecified in the call to f.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to