Rsubmit: Eclipse Plugin for R code submit. (0.0.1 Alpha)
The Rsubmit plugin executes selected R source code from within an editor window. The code is passed to a (local or remote) Rserve session and the output is streamed back to Eclipse.
Eclipse update site: http://www.alysis.de/Rsubmit/update
Warnings | What's new | Features | What's missing (currently) | Requires... | Download, install Rsubmit | Using Rsubmit | Usage scenarios | Bugs | Contains code from... | The Making of ... | Copyright
- This software is in its Alpha stage.
- This version of the plugin works under Linux and Windows. Windows installations of Rserve tend to be unstable. Please see the Rserve for Win release notes: http://stats.math.uni-augsburg.de/Rserve/dist/rserve-win.html. The authors of Rserve recommend a Unix or Linux server.
- This version works with Sun JDK 1.4.2 (but not JDK 1.5) and R Version 2.2.1 with Rserve for the same version.
- 2006-06-26 Some images in this page.
- 2006-06-25 Works with windows now. Added a callback server address to the launch configuration.
- 2006-06-24 Cleaner source code, modified connection handling. Connects to Rserve on Windows, but crashes Rserve session.
- Submit of selected code segments in opened files or whole text (if nothing is selected) from an eclipse editor.
- Connects to local Rserve sessions or Rserve on a remote host.
- Supports different configurations for code submit.
- Keeps workspace elements in memory, supports incremental code submit.
- Is (partially) able to display output from a remote Rserve session in console window
- Output of remote sessions is (or should be) displayed incremental and in (near) real-time. Well, at least it worked in the runtime workbench. The writing to the Eclipse console window (in "normal" Eclipse mode) seems to be buffered, so there is not always a immediate reaction to new R output.
- No login handling for Rseve server with authentication.
- No multilanguage support.
- R objects are not returned to Eclipse.
- Created files are not available via Eclipse (except when you have a local Rserve session running and the workspace directory lies within the Eclipse project directory).
- Lost connections to Rserve require a restart of Eclipse (resume of a lost connection is not yet implemented).
- Ho help files (currently).
- Does not start with Sun JDK 1.5.
- Eclipse 3.1.
- An R installation. Get it from: R Project for Statistical Computing (http://www.r-project.org/).
- Installed Rserve (http://stats.math.uni-augsburg.de/Rserve/).
- Please start the Rserve session before connection from the plugin! (Currently the connection will not restart after an error).
- There seems to be an issue with JDK 1.5. It works with 1.4.2. Please try and report errors to me.
- First check which Rserve versions are currently available from http://rosuda.org/Rserve/dist/rserve-win.html.
- Download the version that matches your local R installation. Don't try to mix different R and Rserve versions.
- If there is no matching Rserve version available then install the latest R version with matching Rserve.
- After downloading Rserve.exe copy this file to the /bin directory of R.
- Open a console window, cd to the /bin directory and run Rserve.exe. The output should be "Rserve: OK, ready to answer queries".
- Open a second console window. Type "telnet localhost 6311". The output should be something like "Rsrv0102QAP1".
- If any of this fails: please read the webpage from http://rosuda.org/Rserve/ (RTFM).
(Works with Linux) In this case the console will display the full R output. Please disable the console output via socket connection.
- Choose "Run" -> "External Tools" -> "External Tools".
- Right click on "Program" launch type in left area and choose "New".
- Enter a name for the lauch configuration, the location of program to start, the working directory and command line call. e.g. Name: Start Rserve, Location: /usr/bin/R , Working directory: /home/user , Command line: R CMD Rserve --vanilla
- Push the "Run" button. The console panel displays the output of the Rserve start process.
- Then choose again "Run" -> "External Tools"
- This time choose "Organize Favorites". Add "Start Rserve" to your favorites.
- To start Rserve from your favorites: select "Run" -> "External Tools" -> "Start Rserve"
- Start Rserve via the command line, usually with the command "R CMD Rserve" and optional options.
- Please start Rserve. Currently the application does not re-establish a connection to Rserve after a failure. You have to restart Eclipse.
To test the application, please create a new Project:
- File -> New -> Project -> Simple Project.
- Then copy the file "testSubmit.R" from the plugin directory (Eclipse/plugins/de.alysis.r.submit/doc/) to the new project.
- Open this file with an editor.
- Right click into the editor window and select "Run As".
- There should be one entry named "R code submit" visible.
- Click on it now.
By clicking "R code submit" entry the application will create a default launch configuration. This launch configuration tries to connect to an Rserve session on server "localhost", port "6311". These are the default settings.
- Open an R code file with the editor of your choice. (I'm using an R code editor with syntax hightlighting from http://www.walware.de) Please note: The R code file needs the extension *.R or *.r. Run the all code lines (when nothing is selected) run a selection of the code.
To do this,
- right click into your code editor window or on the selected code within.
- Then choose "Run" -> "Run as ..." -> "R Code Submit".
- If no text is selected the entire file will be submitted.
The output will be displayed in the submit console window. If you work on a remote Rserve server or didn't start your Rserve session from within Eclipse, only those code lines with an explicit print()-Statement will be displayed.
To view or change the default configuration:
- Select Run -> Run from the menu.
- After some time a dialog with different configuration types pops up.
- Search for the type "R Code Submit".
- There should be on launch configuration with the name "Generated default launch config".
- Select the "Generated default launch config".
- On the right a tab with the name "Connections" will be displayed.
- As default the application connects to a local Rserve session ("localhost" = 127.0.0.1) on port 6311. The default for the output socket connection is to the local compouter on port 6312. Please change the addresses and port numbers according to your environment.
- If you use a remote server then you have to select 'connect to a remote server ...' and enter the name or the ip address of the remote server. In this case you also have to enter the address of the "Console output host name". This is the address of your local computer. It is used for the callback connection from the remote server. It is either an IP address or a server name under which the server is able to connect to your local computer. Please make sure that the servers name resolution "knows" the name or address you entered.
- The "Console Output" tab contains the the socket server port. Rserve opens a connection to this port and transfers text output back to the Eclipse console window. Please change this port number if necessary.
- Additional launch configurations may be created manually. Right click on the "R Code Submit" node and select "New".
- If you have multiple launch configurations, then you will have to select one when submitting code.
- If you delete all launch configurations and submit code then a new default configuration will be created.
- If there are more than one launch configuration, then you will be asked which one to use for code submit.
- (Sorry, does not work yet) If you use more than one launch configuration you may consider to use the "Favorites". Click on the down-arrow besides the "Run"-Icon below the main menu. Then select "Organize favorites". Click the "Add"-button and select your favorite launch configurations. To call the favorites simply click again on the "down"-arrow and select your favorites.
R code submit works with every "real" Eclipse editor. I'm using a version of the StatET editor (with syntax hightlighting for R). I's available from www.walware.de (Update site: http://www.walware.de/Eclipseupdates/)
There is currently no way to download or open files from Rserve sessions.
What you can do (on a local sessions) is to set the workspace directory to an appropriate directory within the Eclipse workspace.
Create a directory (e.g. "work") within your project workspace within Eclipse. Right click the new directory and select "Properties". Copy and paste the "Location"- entry to the R code window. Use the function "setwd(<Location directory>)" to set the working directory of R to the Eclipse workspace directory.
Please note: you have to refresh the "work"-directory in Eclipse to view newly created files.
Some ideas for using this plugin:
- Manage R files within eclipse. Lots of tools including support for different projects, version control, test tools etc. are available.
- Connect Linux, Unix or Windows clients to a Unix server with Rserve. You will have to manage only one central repository for data and statistical functions and users update their client via an update site.
- Develop (web) applications with different languages and integration R in your development with this plugin.
This is alpha software. Please don't be too disappointed. I also had to rush this release a bit (don't ask why).
Issues were:
- The plugin seems to work with Sun JDK 1.4.2, but not with 1.5. Please try it on your system. I need feedback.
- The Rserve session does'n return all the output from a R session, only the output from print()-Statements. Maybe this could be changed with the right settings.
- Favorites for launch configurations don't work.
- Rserve: Package org.rosuda.JRclient. Version is: RE817. The binary class files and the sources are provided in a separate Eclipse plugin (org.rosuda.JRclient_RE817). The latest versions of JRCcient with sources are available from http://stats.math.uni-augsburg.de/Rserve/.
Essential ingredients:
Alle Rechte dieser Anwendung und der zugehörigen Dokumente und Dateien liegen beim Autor: Friedrich Schuster, mail@friedrich-schuster.de
Die Anwendung unterliegt der GPL.
Soweit sich keine weiteren Einschränkungen aus der GPL ergeben, gelten die folgenden Festlegungen:
Für die Dateien, Inhalte und Konzepte der Anwendung wird gefordert, soweit im Einzelfall nicht anders geregelt und soweit nicht fremde Rechte betroffen sind, das die Verbreitung als Ganzes oder in Teilen davon in elektronischer und gedruckter Form unter der Bedingung erwünscht ist, solange die Quelle ("Friedrich Schuster") und die URL (http://www.alysis.de/) genannt werden.
Ohne vorherige schriftliche Genehmigung des Autors ist eine kommerzielle Verbreitung ausdrücklich untersagt.
Generated on Mon Jun 26 20:41:03 2006 for RSubmit by
1.4.6