[R] Emacs & ESS under Windows

Peter Dalgaard BSA p.dalgaard at pubhealth.ku.dk
Sun Mar 4 20:57:21 CET 2001


Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> > As a windows, just learning Linux user, I have never used Emacs so i
> > would be grateful for a run down on its benifits.
> 
> As for actually running R in emacs, I think the benefits are mainly
> negative on Windows.  The things you can do in inferior-R-mode you can
> often do better in the RGui console. (Many long-term users of ESS on Unix
> I know almost never run R within it (since one can have multiple
> windows).)  The benefits are most apparent to refugees from Unix forced to
> use Windows.

Hmm. I too find myself not using it all that much, but...

One thing that you can do with inferior-R-mode is short-script editing
and evaluation. Some operations (like moderately complex graphics)
require 5 or more successive R commands and redoing them with
command-recall becomes a real pain. With ESS, mark out the block of
commands, Ctr-c Alt-r (C-c M-r in Emacs parlance) and away you go.
(You can do that by cut&paste from any editor, though. Except that on
Unix, TABs cause some grief with readline's filename completion...)

> The big advantage is that you can use a language sensitive editor, and the
> same one across platforms.  Once you get used to a language-sensitive
> editor you will find it points out most of your programming typos before
> you ever run the code, e.g. by strange indenting appearing.  One thing I
> find hard to cope with: emacs makes incredible use of control/shift/meta
> keys (sometimes all at once), and those do differ in position by plaform.

There is a menu bar... but I too am a readline addict and tend to get
bugged by the fact that the cursor keys have their usual editor
bindings in inferior-R-mode, and you need control-up to recall
commands. Of course, the keys are always rebindable in emacs...

A couple of other nice things are transcript-mode where you can step
through previous R output and send the commands in it to R, and the
possibility of editing .R source files while sending their current
contents into the R process for testing with C-c M-b (cue Martin's
recent gripe about people generating patches to R core functions with
fix(function) rather than editing the source .R file).

> Unfortunately Emmanual's instructions were for versions of Emacs and
                ^^^^^^^^
"if all else fails, read Emmanual.." ;)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list