>>> Thomas Lumley <tlum...@u.washington.edu> 15/01/2010 16:07 >>>
>> Which should I use or does it matter, please?
>
>I would say to use = if you are teaching people familiar with C or
Java, and to use <- otherwise.

Nothing like an option to induce polarisation!

'=' is used in at least two contexts in R, one of which does not imply
formal assignment. 

'<-' (and the left-to-right version '->') only mean formal assignment.

It is nearly always better in teaching programming languages to teach
the unambiguous/'always safe' form first or only. 

Anyone who learns multiple languages should be able to cope with such a
small change in operator, and the rather important difference between
assignment, name/value pairing and logical equals that R makes explicit
is actually a useful indicator that they are genuinely different
things.

Steve Ellison



*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
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