Re: [R] What to use for assignment, " = " or " <- "?

From: Ben Bolker <>
Date: Sun, 06 Apr 2008 14:35:11 +0000 (UTC)

 <Bill.Venables <at>> writes:

> I've noticed an increasing tendency for people to use '=' rather than
> the older '<-' symbol. When '=' became available as an assignment
> operator in S-PLUS in the late '90s my first reaction was to switch to
> it as well. Brian Ripley warned me that it was not a good idea. As
> usual he was right, but it took a couple of pretty serious
> finger-burning episodes before I came fully around to his view.
> I suspect the push towards using '=' instead of '<-' has two main
> drivers:
> 1. the world is full of lazy typists
> 2. right now there seems to be a big influx of Matlab people into R, and
> it makes them feel more at home.
> Neither of these is much of a reason, I reckon.

   It may not be a good reason, but the reason I usually teach "=" rather than "<-" to my students is that they are usually learning scripting/programming for the very first time, and the "=" syntax for assignment (which as I recall was called "gozzinta", for "goes into", in the FORTRAN coloring book) seems natural to most people (even though it's logically quite different). They are so overwhelmed by learning new things that I don't want to add one more. (This is admittedly a judgment call.)

  Ben Bolker mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sun 06 Apr 2008 - 14:41:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Apr 2008 - 20:31:08 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive