Rgedit logo

Welcome to Rgedit

(c) 2009-2011, Dan Dediu


About
Main features
News
FAQ
Wishlist and suggestions
SourceForge project site
Download
Debian package



      About

Rgedit is a gedit  plug-in allowing it to interface with the statistical programming environment R , and to become, thus, a simple and light-weight IDE for it.

The project was inspired by the amazing projects rkward , JGR and Tinn-R (congratulations for a very good job!), which provide full-featured IDEs for R designed for KDE , Java and for MS Windows , respectively.

Rgedit, however, aims to offer a simpler set of features than them, providing the proficient/professional R user an environment which would boost their efficieny while keeping interference and resources consumption to a minimum. Moreover, by using GTK+  and gedit, it is better suited not only to users of Gnome  and Xfce, but also to those who prefer for example Openbox  and their own collection of applications. In fact, Rgedit is the direct result of my needs and habits when working with R under Linux (and, lately, quite a bit of user feedback).


      Main features

Below is a screen shot of a typical session using Rgedit.



This illustrates some of the main features of Rgedit:
For more info please check the help files (also included with the latest release).

rgedit was developed initially on ArchLinux Archlinux (Openbox), Debian Lenny Debian Lenny (Gnome), Fedora 13 Fedora (Xfce) and currently on Debian Squeeze Debian Lenny (Xfce). I test it also on various flavours of Ubuntu Ubuntu (Gnome), OpenSuse OpenSuse (Xfce), SalixOS SalixOS (Xfce) and CentOS CentOS (Gnome).


      News

14 Nov 2009
First version of this site.
14 Nov 2009 Release of rgedit v0.6.4, a bug-fix release:
Some window managers (e.g., metacity in Gnome) would not manage correctly a detached R console (e.g, minimizing the gedit window with a detached R console would result in an impossibility to restore the gedit window). This was fixed by making the detached R console a top-level window, allowing it to me minimized/restored independently of the gedit window even in metacity.
11 Jan 2010
Release of rgedit v0.6.5, fixing a spelling mistake and adding some new features:
- added the possibility to skip empty or comment lines when sending the current line to the R console
- the user can specify an R file to be autorun when an R session starts (for example, to load libraries or workspaces)
- a menu "Check for updates" which allows the user to check for newer versions.
19 Jan 2010
Release of rgedit v0.6.5.1, a minor bug-fix release:
Save and Load R Workspace dialogs did not work as intended.
03 Feb 2010 Release of rgedit v0.6.5.2, a minor bug-fix release:
Rgedit would crash when the path to the autorun R script is empty (thanks to kajote and kaspertofte).
11 Feb 2010
Release of rgedit v0.6.5.3, a minor feature release:
Automatically make the bottom panel visible when adding an R workspace, instead of having to make it visible manually (thanks to fengqiangyang).
03 May 2010
Release of rgedit v0.7.0, a major release:
Fixed several minor bugs, added minor features (e.g., the capacity to use the current document's directory and the current working directory), reorganization of the menus.
Added two new major features:
1. side panel allowing the navigation within R files - can consider function defintions, data.frame defintions and specially formatted "landmark" comments;
2. wizards allowing user to generate customized R code from pre-defined templates using a GUI.
Security warning: check the Python expressions within new wizards and the R code generated by them for potential malicious code (see help file for details)!
08 June 2010
rgedit is in Debian!
Great news! rgedit was accepted in Sid as "gedit-r-plugin" (http://packages.debian.org/sid/gedit-r-plugin) thanks to Mateusz Kaduk. Thus, the users of Debian and its many derivatives (Ubuntu, Mint, Sidux, CrunchBang, MEPIS, etc.) will be able to simply "apt-get install gedit-r-plugin" (with the right repository enabled for now :)).
Thanks again, Mateusz.
08 June 2010 Release of rgedit v0.7.0.1, a minor feature & bugfix release:
Fixed a bug appearing when defining a variable named "T" which would interfere with piping commands to R (thanks to Bertrand Marc).
Added a new option in the configuration dialog telling R not to echo commands sent through source() (thanks to Axolotl9250).
21 June 2010
Welcome to Mateusz Kaduk!
He is a new developer (and, so far, the only one besides me :) )!
24 June 2010
Release of rgedit v0.7.0.2, a minor bugfix release:
Mateusz Kaduk added a patch to fix rgedit when installed system-wide, moved the .preferences file to $HOME/.rgedit.preferences so that it can be accessed no matter where the plugin is installed and fixed file permissions for non-executable.
Thanks, Mateusz!
04 July 2010
Release of rgedit v0.7.0.3, a minor feature release:
Shortcuts like <Ctrl>Return or <Shift>Return can be defined for sending stuff to R, the detached R console remembers position and size between sessions (thanks Alex Ruiz for both suggestions), and newly (re-)started R sessions can use the current document's directory as working directory (option added in the config dialog).
07 August 2010 Release of rgedit v0.7.0.4, a minor feature and bug fix release:
Updated the ReadMe.txt to reflect the change in the position of the preferences file. Fixed a bug preventing changing the names of R tabs. Fixed the HTML help, which changed in recent versions of R.
Added the possibility to specify the position of R tabs (top, left, right or bottom) and if they should always be displayed (options in R console right-click menu).
20 August 2010 Release of rgedit v0.7.0.5, a minor feature release:
Pressing <Ctrl>K in the R console copies the last executed line to the clipboard, while <Ctrl><Shift>K also pastes this into the current gedit tab at the cursor's position (thanks to Alexandre Cesari for the suggestion). For this to work you must have xclip or Xsel on you *nix machine (pbcopy  for MacOS X).
It is possible now to use <Ctrl>C in the R console to copy the selection to clipboard (options in the "Edit keyboard shortcuts" dialog, disabled by default; in this case you can define ESC or <Ctrl>Q to replace it for computation breaking).
Now, there is a new file in /RCtrl/messages_and_warnings.txt which contains the most notable changes and warning and, by default, these are displayed in the R console upon start (this can be changed using the settings dialog).
20 August 2010 Happy birthday rgedit!
Exactly one year ago the first version was released on sourceforge!
Thank you all for using and testing it, providing comments and suggestions and especially to Mateusz :)

20 August 2010 Debian package for rgedit:
Again thanks to Mateusz, there is an up-to-date Debian package with the latest version. I'm quoting his instructions:

wget http://www.kaduk.net/~mateusz/gedit-r-plugin/kaduk.asc ; cat kaduk.asc | apt-key add -
echo "deb http://www.kaduk.net/~mateusz/gedit-r-plugin ./" >> /etc/apt/source.list
apt-get update
apt-get install gedit-r-plugin

14 October 2010 Release of rgedit v0.7.0.6, a minor feature release:
rgedit-specific toolbar and sidebar can be shown only for R source files (this can be toggled using the R -> Show/hide toolbar -> Show toolbar only for R files check menu.
Slightly changed the design of the options dialog box to take less vertical space (fit better on small netbooks). Transitioned from libglade to GtkBuilder.
Begun preparing rgedit for localization/internationalization by marking all language-specific strings in the Python code using _(...) but this is far from ready (in fact, help with these would be greatly appreciated!).
09 November 2010 Release of rgedit v0.7.0.7, a back-compatibility release:
rgedit is now compatible with older systems (such as RHEL5 and CentOS5) which use Python < 2.5 (no inline if...else statements) and gtk < 2.12 (glade instead of gtkbuilder, tooltip issues): thanks to Peter Forster for bug reporting and testing.
However, it is strongly recommended to use a newer Python (2.5+) and gtk (2.12+) to get all the features working!
05 December 2010
Release of rgedit v0.7.1.0, a feature release:
while waiting for gtksourceview to have proper code folding, I have implemented a basic code folding engine (accessible through the right-click menu), capable of folding selected text or blocks of code as specified by the user (please see the Help for details). This feature was tested quite extensively but given that it's basically a hack based on another hack (Kawaikunee's 2009 folding gedit plugin -- thanks to Kawaikunee) it should be treated as BETA (please report all bugs and/or suggestions).
Add "run up to current line" which sends to R all the code up to and including the current line of text.
Fixed some small bugs (defintion of blocks of code, number of lines to be sent directly to the R conole).
The temporary file used to communicate with R is now created with a dynamic & unique name instead of a fixed name (thanks to Peter Forster).
15 June 2011 Release of rgedit v0.7.1.0-Gtk3, the initial port to GTK3:
Most features work except for code folding and the ability to use Ctrl+C to copy from the R console (this is replaced by Ctrl+X) and Esc to break the current R computation (reverted to Ctrl+C).
Please report any bugs you might find. I developed and tested it on a Fedora 15 Xfce. Also, I might possibly use a different versioning system for the Gtk2 and Gtk3 versions in the future.
20 October 2011 Release of rgedit v0.7.1.1-Gtk3, dealing with Ubuntu 11.10:
Fixed some Gtk3-related obbities in Ubuntu 11.10. Please note that the Ubuntu 11.10 repositiory still contains the GTK2 version of rgedit which does not work (the correct version is in Debian Sid but I did not test it in Ubuntu), so that the manual install is recommended!
19 December 2011
Release of rgedit v0.7.1.2-Gtk3, a minor bug fix:
Fixed a minor issue with the detached R console.
Recommended package: colorout for colorizing the R console output (thanks to Jakson Alves de Aquino).


      Debian package

Thanks to Mateusz, there is an up-to-date Debian package with the latest version for Squeeze (due to the recent freeze no new versions are accepted). I'm quoting his instructions:

wget http://www.kaduk.net/~mateusz/gedit-r-plugin/kaduk.asc ; cat kaduk.asc | apt-key add -
echo "deb http://www.kaduk.net/~mateusz/gedit-r-plugin ./" >> /etc/apt/source.list
apt-get update
apt-get install gedit-r-plugin


      FAQ

Some of the most frequently asked questions concerning rgedit:

1. How to display data.frames or matrices with many columns when R console is wide enough (thanks to Bastian Pöschl)?

Due to is design, rgedit does not automatically update the number of available columns to refect the R console's current the width, which makes print() to not use efficiently the space available. This is most visible with data.frames or matrices [e.g., try something like data.frame(sapply(1:150, function(x) data.frame(x)))].
One solution is to manually tell R the available width using options(width=Number_of_Chars) or to use the function showData() from package relimp.

2. How to define a shortkey for writing <- ?

You can use gedit's Snippet plugin to define a shortcut (like, for example, Ctrl+Shift+?) for inserting <- when an R file is open.

3. How to associate gedit with .R files (thanks to Matthieu Stigler)

On Debian/Ubuntu .R files (as opposed to .r ones) can be associated with gedit with this method suggested to Matthieu on r-sig-debian by Petar Milin (I reproduce it literally below, adding just some colours and the entry for Romanian; please note that I did not test it myself as I use .R files for R objects but it looks fine to me):

This is from several helps and how-tos:

First, make same safe-guarding:

> sudo cp /usr/share/mime/packages/freedesktop.org.xml /usr/share/mime/packages/freedesktop.org.xml_backup

Then, open  freedeskop.org.xml to edit mime:
 
> sudo gedit /usr/share/mime/packages/freedesktop.org.xml
 
Now, you should find the end of one mime-specification and the beginning of next. I did mine just after Python Python mime-specification. Last two lines are:

   <glob pattern="*.py"/>
   </mime-type>
 
And the next mime-type begins with:
 
   <mime-type type=SOMETHING BLAH>
 
So, between the </mime-type> and <mime-type type=SOMETHING BLAH> insert this:

  <mime-type type="text/x-R">
    <sub-class-of type="text/plain"/>
    <comment>R code</comment>
    <comment xml:lang="az">R kodu</comment>
    <comment xml:lang="bg">Код на R</comment>
    <comment xml:lang="cs">Kód R</comment>
    <comment xml:lang="cy">Côd R</comment>
    <comment xml:lang="de">R-Befehle</comment>
    <comment xml:lang="el">κώδικας R</comment>
    <comment xml:lang="eo">R-kodo</comment>
    <comment xml:lang="es">Código R</comment>
    <comment xml:lang="eu">R kodea</comment>
    <comment xml:lang="fi">R-koodi</comment>
    <comment xml:lang="fr">code R</comment>
    <comment xml:lang="hu">R-kód</comment>
    <comment xml:lang="it">Codice R</comment>
    <comment xml:lang="ja">R コード</comment>
    <comment xml:lang="ko">R 코드</comment>
    <comment xml:lang="ms">Kod R</comment>
    <comment xml:lang="nb">R-kildekode</comment>
    <comment xml:lang="nl">R-code</comment>
    <comment xml:lang="nn">R-kode</comment>
    <comment xml:lang="no">R-kildekode</comment>
    <comment xml:lang="pl">Kod R</comment>
    <comment xml:lang="pt">código R</comment>
    <comment xml:lang="pt_BR">Código R</comment>
    <comment xml:lang="ro">Cod R</comment>
    <comment xml:lang="sq">Kod R</comment>
    <comment xml:lang="sr">R ко̂д</comment>
    <comment xml:lang="sv">R-kod</comment>
    <comment xml:lang="uk">Код R</comment>
    <comment xml:lang="zh_CN">R 代码</comment>
    <glob pattern="*.R"/>
    <glob pattern="*.r"/>
  </mime-type>

Finally, update mime:

> sudo update-mime-database /usr/share/mime/
 
That's it!


      Wishlist and suggestions

Below is a list of things I'd like your help with and/or hear opinion on:

If you have ideas, opinions, comments, questions or pieces of relevant code please contribute to the discussion going on in the Suggestions & Ideas topic in the Open Discussion section of rgedit's sourceforge.net Forum, and help make rgedit better.




This project is hosted on
 Get RGedit at SourceForge.net. Fast, secure and Free
            Open Source software downloads