Site icon R-bloggers

A texteditor for R

[This article was first published on Research tips » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I’ve been using RWinEdt for the last few years for all my R coding. But it no longer works with WinEdt 6.0 and no update has been forthcoming. Consequently, I’ve been looking around for something similar to take its place.

This question has been asked before on StackOverflow and many suggestions were made including popular unix editors such as Vim and Emacs, and the programmers IDE Eclipse with the StatET plugin. However, these all have a relatively steep learning curve and I’d prefer something simpler and more light-weight.

Others preferred the Windows IDE Tinn-R, but again, I really just want a text editor not some program that is going to take over my R sessions for me.

Instead, I’ve decided to switch to Notepad++ with NppToRNotepad++ is a general text editor with all the functionality you would expect from a good text editor. It handles almost every species of text file and has colour syntax coding for all the common file types. With the NppToR plugin, there is syntax highlighting, code folding, and auto-completion for R code also. It also integrates nicely with R: just hit F8 to send the current line or selection to R, or Ctrl-F8 to send the whole file.

The code-folding is a nice addition that RWinEdt did not provide. It makes it easier to work on larger files as I can hide away functions, loops and conditionally executed code in order to see only the parts of the code that I am currently working on.

There is a nice introduction to NppToR in the R Journal for June 2010 (starting page 62), written by the developer, Andrew Redd.

I’m not sure if Uwe Ligges is going to produce an updated RWinEdt for use with WinEdt 6.0, but I don’t think I will use it in any case. NppToR is just what I need.

To leave a comment for the author, please follow the link and comment on their blog: Research tips » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.