Running R from Eclipse – StatET installation and Usage

421 篇文章 15 订阅

Running R from Eclipse – StatET installation and Usage

By  admin  | February 15, 2016

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 http://download.walware.de/eclipse-4.5. For other versions check theInstallation page at StateET site. To add it via eclipse go to Help -> New Software ->Add and write as shown below
    Selection_133
    Once you add that you will be presented with the list of softwares for installation, check them all.
    Selection_134.
    Complete the Installation.

  3. Before we start using the plugin, we need to install a package called rj
    Selection_138
  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”
    Selection_136
  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
    Selection_137
    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.

Category: R
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值