[R] difference between assignment syntax <- vs =

Kenneth Knoblauch ken.knoblauch at inserm.fr
Mon Feb 23 12:53:17 CET 2009


It's easier to read.  Better machine-human interaction.

ergonomic:  (esp. of workplace design) intended to provide optimum  
comfort and to avoid stress or injury.

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

> Ken Knoblauch wrote:
>> 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!
>>
>>
>
> ergonomy?
>
> vQ
>



-- 
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