[R] difference between assignment syntax <- vs =
Thomas.Mang at fiwi.at
Mon Feb 23 10:20:12 CET 2009
thanks for the link.
In the bottom part of the relevant section, you say:
"Standard advice is to avoid using '=' when you mean '<-'...."
Is this a formal, generally accepted (R community) advice, or does it
reflect you personal opinion?
Note I am not asking this question as to criticize by any means, but
instead I just want to know for my own work (which will be partially
released to others) if the '<-' - style is the preferred one
(Personally, with a strong background from other programming languages,
I have always used '=' so far).
Patrick Burns wrote:
> 'The R Inferno' page 78 is one source you can
> look at.
> Patrick Burns
> patrick at burns-stat.com
> +44 (0)20 8525 0696
> (home of "The R Inferno" and "A Guide for the Unwilling S User")
> Thomas Mang wrote:
>> Both operators <- and = can be used to make an assignment. My question
>> is: Is there a semantic difference between these two? Some time ago, I
>> remember I have read that because of some reason, one should be given
>> preference over the other - but I cannot remember the source, nor the
>> argument, nor which operator the preferred was.
>> What is the present state ?
>> Is still one version better than the other, or is it only a matter of
>> taste what to use ?
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help