[R-SIG-Mac] Assignment arrow
Simon Urbanek
simon.urbanek at r-project.org
Wed Feb 28 19:26:35 CET 2007
John,
On Feb 10, 2007, at 6:25 PM, John Shonder wrote:
> To use R on my Mac, I had been running ESS in emacs under X11. I
> found R.app, and much prefer it -- especially the quartz graphics
> -- but there's one thing I miss about ESS: to get an assignment
> arrow "<-" you just type shift underscore. In R.app, you have to
> type the less than sign (shift-comma) followed by the dash. Coming
> over from ESS, the extra keystroke bothers me.
>
To be honest IMHO it's one of the annoying "features" in ESS
(configurable, though, I presume), because "_" is a valid character
used in names, so you end up getting broken code like .Platform$r <-
arch instead of the intended .Platform$r_arch when copy/pasting code.
In old times it was legal to use _ instead of <-, so ESS was helping
to make your code more legible without changing the syntax (a_10 was
the same as a <- 10), but that is not true anymore.
> Is there an easier way to type an assignment arrow in R.app? Some
> way to make a keyboard macro perhaps? I've looked through the FAQ
> and can't find anything. I appreciate any assistance.
>
= is probably the best one-key alternative in most cases.
Unfortunately adding a "macro"-type thing is not that easy in the
current setup (e.g. I could imagine using something like <alt>+<=> or
possibly better <alt>+<->), but I'll see if it is easier for the
upcoming version 2 of the GUI.
Cheers,
Simon
More information about the R-SIG-Mac
mailing list