[R-SIG-Mac] please recommend an editor

Kasper Daniel Hansen khansen at stat.Berkeley.EDU
Tue Dec 6 21:29:59 CET 2005


As several people have replied, Emacs is by far the preferred choice  
for most serious R developers. Using the ESS package with Emacs  
provides you with an interface to R which goes beyond just syntax  
highlightning. An example (which Simon has already described): you  
can press a key combination to start looking up in the help system.  
Typing plot. and pressing TAB will then give you alist of help pages  
for functions starting with plot. amongst the loaded packages. This  
is extremely useful. There are other features such as the ability to  
send a single line of code or a single function to R (instead of  
sourcing the whole script). For package writes there are also nice  
modes for .Rd files and (in case you use it) saved transcript files  
(you can eg. say you entire transcript from an R session and remove  
all the output, leaving only the commands as a sourcable R script.).  
Ess supports Sweave documents as well.

Emacs has other advantages:
* it is truly cross-platform, a big advantage if you are also using  
*NIX servers and/or windows
* it supports basically any kind of language out there, so if you  
write in a set of different language, it makes sense to use a single  
editor
* One small lifesaver for statisticians (and others): it supports  
rectangular cut and paste: imagine being able to cut out a column  
from a table...

Other editors does the same, but the functionality of the ESS package  
is to my knowledge not present in any other editor, making Emacs a  
first choice for R users.

Having said all of that, Emacs is a big program (which btw. is older  
than dos), with some learning curve. It will take you a long time  
before you feel totally at home in it. And you will spend the first  
couple of months cursing about the strange key combinations and the  
small quirks. So do not even think of using it unless you plan to do  
more than write 10 lines of R code.

As Jan has said: you do not in any way need to run X11 to run Emacs,  
although it makes sense to use x11 to plot graphics.

Other people have suggested other editors for the causal user.

/Kasper

On Dec 5, 2005, at 2:07 PM, Hai Lin wrote:

> Hi R-Mac users:
>
>   I am using R in Mac OS 10.3.8 and I am trying to find an editor  
> which is compatible with R in Mac. I recently bumped into Xcode for  
> a few times in Mac when I directly opened scripts. Would Xcode be a  
> good editor to learn? Are there a lot people use it?
>
>   I don't know what you use to edit your files. Can you recommend?
>
>   Thanks for any information.
>
>   Kevin
>
> 		
> ---------------------------------
>
>  Single? There's someone we'd like you to meet.
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list