[R] why a text editor?

Duncan Murdoch murdoch at stats.uwo.ca
Mon Mar 1 16:07:21 CET 2010

On 01/03/2010 9:53 AM, Ivan Calandra wrote:
> Dear users,
>  From the recent discussion, I've wondered whether a text editor would 
> be useful.
> However, I couldn't find a good explanation of what it is used for.
> For now, under Windows XP, I use the standard  R Editor to write and run 
> scripts.
> What can I do more with a text editor? It is worth using it?

The built in editor in the R gui is a minimal text editor.  The editor I 
use (a shareware editor named Textpad) is much more capable.  Some of 
the features I use frequently:

- I can turn on line numbering, to track down errors quicker
- I can search within a file, or within a collection of files not in the 
editor, and the search and replace functions are more capable.
- I can turn on syntax-based highlighting, customized to R, or C, or 
LaTeX, or HTML, ...
- I can customize the keys, so a single keystroke runs the current file 
through LaTeX or shows it in a browser
- I can view files in hex mode, to see weird bytes
- I can configure it to use Unix-style line endings, which is convenient 
when working on the R sources.

Those features are all pretty common in text editors that are aimed at 
programmers.  I wouldn't particularly recommend Textpad; I think there 
are others that are just as capable.  On the other hand, I don't know 
any that are so much more capable that I'm tempted to switch.

Duncan Murdoch

More information about the R-help mailing list