On 14/01/2008, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Its not related to scoping. f(b = 10) passes 10 as argument b
> but f(b <- 10) assigns to variable b (which has nothing to do with
> argument b) and then passes the result of the b<-10 expression (which is
> 10) to f.  Since no argument was specified it uses positional
> matching and the first position is argument a.  Thus its the same
> as f(10).  Note that f(b<-10) isthe same as f( (b <- 10) ) which may
> make it clearer.

Of course! Straightforward!

Many thanks,

Mark

-- 
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK

______________________________________________
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