[R] difference between assignment syntax <- vs =

Ken Knoblauch ken.knoblauch at inserm.fr
Mon Feb 23 12:45:36 CET 2009


Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk <at> idi.ntnu.no> writes:

> 
> Thomas Lumley wrote:
> >
> > Although it's probably true that most long-time R users use <-, this
> > is at least in part because a long-time R user would initially have
> > had to use <-, since = wasn't available in the distant past.
> >
> > I would say that it's entirely a matter of taste -- the things that
> > otherwise could have been traps are mostly syntax errors.  The only
> > proviso is that if you post code using = it is (even more) important
> > to leave spaces around the = than it would be for <-.
> 
> the reason being ...?
> 
> vQ
> 

ergonomy!


-- 
Ken Knoblauch
Inserm U846
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/members/kenneth-knoblauch.html




More information about the R-help mailing list