Integrate R in Bioclipse
From BioclipseWiki
| Maintainer: | Valentin Georgiev |
| Plugins path: | net.bioclipse.r |
| Status: | Working plugin, R-console. |
| Wiki page last updated: | 2012-9-13 |
| Repo URL: | git://github.com/bioclipse/bioclipse.statistics.git |
Statistics plugins that allows interaction between Bioclipse and a R session.
Part of the Bioclipse.statistical repository.
Contents |
TODO
- catch the quartz() command and give the user a message saying that quartz() is disabled for stability reasons and that x11 should bes used [Done]
- R sessions/history (look at Eclipse+StatET)
The work with the R console should be organized in the Bioclipse way - the user creates R project and the files associated with this project are stored stored in a directory in the bioclipse-workspace. R sessions are stored by the user project-wise. The default R wd is bioclipse-workspace => now session is loaded on startup.
- R scripts Not started
- multiple lines execution/";" separated commands execution (look at Eclipse+StatET) [Done]
- Quartz plotting Waiting for response
- q() command Not started
- session saving prompt Not started
- closing the view Not started
- check about closing the connection with R?!?
- open help pages in the BC internal browser [Done]
- Check why [Done]
R workspace: "/Users/valentingeorgiev/bioclipse-workspace"
Use load("file") and save.image("file")
is not printed in the R console on startup
- Reading Rhistory when loading R session file Not started
Set up the correct system environment
System install dependencies: R, rJava and RJ.
It is basically enough to install R. Standard Windows path: C:\Program Files\R\R-{version}\
Once R is installed, running Bioclipse-R installs rJava and RJ if they are missing (currently working on all platforms). For manual installation:
install from R:
install.packages('rJava', repos='http://cran.stat.ucla.edu')
install.packages('rj', repos='http://download.walware.de/rj-0.5')
install from console:
R CMD INSTALL --no-test-load rJava*.tar.gz R CMD INSTALL --no-test-load rj_0.5.5-4.tar.gz
On a default R installation the R_HOME value is:
/Library/Frameworks/R.framework/Resources on MacOSX ... on Windows ... on Linux
Linux
Look at this page for creating a personal R package library.
Installing R packages on Ubuntu linux
See [1]
Make sure you have Java Development Kit installed and correctly registered in R:
sudo R CMD javareconf
If you get something like this:
Java compiler : not present Java headers gen.: Java archive tool:
instead of:
Java compiler : /usr/bin/javac Java headers gen.: /usr/bin/javah Java archive tool: /usr/bin/jar
you need to install the Java Development Kit (JDK):
sudo apt-get install openjdk-6-jdk
and run javareconf again:
sudo R CMD javareconf
There are two options for installing the required R packages:
(i) install the required packages manually from within R
(ii) prepare the environment for the automatic Bioclipse installation (recommended)
...to be continued
Installing R packages on Debian linux
Follow the instructions here to install the latest R release to squeeze.
apt-get install openjdk-6-jdk
no need to run R CMD javareconf
rJava installs without problem
Installing R packages on openSUSE linux
JDK installed by default, but you need to install the gcc compiler and make (via YaST).
Setup Bioclipse for R
Choose one of the following two ways:
get Bioclipse from hudson and R from updatesite
- Download bioclise from latest successful build: Bioclipse 2.5.0.
When started go to Help/Install new software, Work with: "http://pele.farmbio.uu.se/jenkins/job/Bioclipse.statistics/lastSuccessfulBuild/artifact/buckminster.output/net.bioclipse.statistics_site_1.0.0-eclipse.feature/site.p2/", and press "Add". Name it R_console. Under uncategorized: select "Bioclipse-R integration", select Next and continue until it ask you to restart, and do so.
Go to "Window > Show View > Other.." under scripting you will find "R Console", and there you go.
Make sure you have set the system environment R_HOME to your R location.
Done!
get Bioclipse & R from gitrepos
Get RServi from StatET
Using git command
git clone https://github.com/walware/rj-servi.git (rj-servi) cd rj-servi git checkout RJ-0.5.5
- import existing project and choose "de.walware.rj.servi" project
git clone https://github.com/walware/rj-core.git (rj-core) cd rj-core git checkout RJ.jri-0.5.5-4
- import existing project and choose "de.walware.rj.data" and "de.walware.rj.server" projects
git clone https://github.com/walware/rj-client.git (rj-client) cd rj-client git checkout RJ-0.5.5
- import existing project and choose "de.walware.rj.client" project
git clone https://github.com/walware/ecommons-coremisc.git (ecommons-coremisc) cd ecommons-coremisc git checkout StatET-0.9.2_E-3.6
- import existing project and choose "de.walware.ecommons.coremisc" project
Userinterface import, not in use! (maybe later)
- git clone https://github.com/walware/ecommons-uimisc.git (ecommons-uimisc)
- import existing project and choose "de.walware.ecommons.uimisc" project
Using eGit in Eclipse
- Import.. Git > Projects from Git
- Clone URI: use the above URL:s, Next, Select ONLY the master branch, Next, Finish.
- Select the cloned git-repo, Next, Next, select ONLY the project needed.
- repeate for all the aboive URL:s
continue
- Download & Import bioclipse.statistical from Git Repo. [instructions]. But checkout and pull the R_console branch.
cd bioclipse.statistics git checkout R_console git pull
- Refresh net.bioclipse.r projects by selecting them in Package explorer and chooce "Refresh" (F5)
- Go to Run configuration, Plug-ins, select "net.bioclipse.r", "net.bioclipse.r.ui" and "Add required Plug-ins"
Now, just Run!
Setup Bioclipse with R from Debian
http://chem-bla-ics.blogspot.com/2011/02/diy-running-r-from-within-bioclipse.html
Currently working Status
- Include the rj package into the r-console
- the RJ packages are in target-platform
- different StatET binarys for R 2.13 and 2.12
Windows
- Windows XP(32 bit) (Valentin)
- check rj : works
- install rj : works (package version 0.5.5-4)
- check rJava : works
- install rJava : works
- binary: installation of R console binaries works
- plotting: works
- eclipse: - how the eclipse dev environment setup works
- Windows 7 (64bit) (Christian)
- check rj : working(with UserLib)
- check rJava: working(with UserLib)
- binary:
- eclipse: Works!
- except for the plotting
- Windows Vista (puter @ bmc)
- Write restrictions on Program folder / Library - is this only Vista-related?
- Create a user library, run R from terminal once and install any packages, and this i created.
- Or use: dir.create(Sys.getenv("R_LIBS_USER"), recursive = TRUE)
Mac
only works with rj 0.5.5-4
- get R_HOME : using the default R path (if not set as system variable)
- check rj : working
- install rj : working
- check rJava: working
- install rJava: working
- check Binary installation:
- Mac OSX (32bit) Valentin: all works
- Mac OSX (64bit) Christian
Linux
- get R_HOME : nothing done here
- check rj : works
- install rj : works
- check rJava: works
- plotting : works
- check Binary installation:
- Linux (32bit)
- Linux (64bit)
