Running R from Eclipse – StatET installation and Usage

February 15, 2016

(This article was first published on R – StudyTrails, and kindly contributed to R-bloggers)

Many developers, especially the Java developers are quite comfortable using eclipse for development. There is a very useful and powerful plugin called StatET that can enable eclipse to work as in IDE for R. Lets first look at how to install it on Linux(Ubuntu).

  1. The plugin is available from the eclipse marketplace.
  2. The eclipse update site is For other versions check the Installation page at StateET site. To add it via eclipse go to Help -> New Software ->Add and write as shown below
    Once you add that you will be presented with the list of softwares for installation, check them all.
    Complete the Installation.

  3. Before we start using the plugin, we need to install a package called rj
  4. If you get an error while installing the package try running this on the command line sudo R CMD javareconf
  5. Once the package is installed go back to eclipse. We first specify R home here. Go to Windows->Preferences->StatET->R Environments.
    Click on ‘Add’ to add a new environment and add the location for R_Home. Click on “Detect Default Properties/Settings”
  6. To run R commands or an R file, we first need to start and R Console from eclipse. To do that we create a Run Configuration. Go to Run Configurations and create a new “R Console” configuration
    Click on Apply and then Run.

That’s it!. You have now successfully installed StateEt plugin. Create a new R Project and a new R file. You can then run the whole file in R or select the code that you want to run and then click on the symbol that says “Run Selection in R”. If you dont see the commands then you might have to go to the StatET perspective. The R Console is normally at the bottom and shows the R commands as they run. You can also create plots and view them in eclipse (it opens up an R Graphics window)

There is another window on left called “object browser” and shows methods from all installed packages. It also shows the Global Environment and all objects in that environment. That can be Very useful.

To leave a comment for the author, please follow the link and comment on their blog: R – StudyTrails. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)