Re: [R] questions on some operators in R

From: Ivan Calandra <>
Date: Sat, 19 Jun 2010 12:43:22 +0200

Dear users,

Regarding the number of keystrokes, you guys should not forget that not everybody has a QWERTY keyboard, and therefore the number of strokes isn't the same for everybody. On an AZERTY keyboard (French), "<" is written without pressing SHIFT, as is "=". On a QWERTZ (German) "=" requires SHIFT while "<" does not! And there are also differences with Mac keyboards. So the argument of the number of keystrokes cannot be used choose "<" over "=" or vice versa.

I'm still quite new to R (I started a few months ago), and I've learned to use the "<-" assignment operator. I've directly found it intuitive since the arrow really shows the direction of assignment. I also had/have to train some students in my team and it looks to me that they are less confused when they use "<-" to assign and "=" for arguments within a function call. I think that when you learn, it's better to have different operators for different things.

The problem might be more for people who used other programming languages, where the assignment operators are different. But hey, there are also people who start learning with R!!

I'll stick to "<-" :)


Le 6/19/2010 05:51, Greg Snow a écrit :
> That is really one reason stated in 2 pieces.
> If you really care more about saving characters or key strokes over clarity of expression then you should really be using APL ( (though I think APL was part of the inspiration for<-, though when S was first created that was a single key stroke). And if you are really concerned with wear on your fingers then you need to switch to the Dvorak keyboard (, though<- is still 3 key presses, but you don't need to move your fingers as much (I actually switched to Dvorak to cure myself looking at my fingers, but now I can type much faster than I ever did on QWERTY).
> If you want to use "=", that is your decision, R-core decided to add it a while back (but I believe most if not all of them still use "<-"). I am more concerned that people understand the what are shortcuts and what they are shortcuts for and are aware of possible problems from using shortcuts rather than the more versatile tools that they are shortcuts for. The longest distance between 2 points is a shortcut.

PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231


______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 19 Jun 2010 - 10:46:09 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 Sat 19 Jun 2010 - 11:20:33 GMT.

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

list of date sections of archive