R, matey

Try this: launch Bioclipse 2 (after the usual updating of all plugins you can think of), open up the Javascript Console, and type this:

js> R
R> x <- matrix( c(9, 9, 0, 1, 3, 2, 0, 7, 6), 3 )
R> y <- matrix( c(4, 7, 2, 1, 1, 0, 1, 6, 5), 3 )
R> x * y
[,1] [,2] [,3]
[1,] 36 1 0
[2,] 63 3 42
[3,] 0 0 30

R> q()

Shiver me timbers! That's R, matey! Big kudos to kaskelot++ for making it work this far.

Support is still a bit spotty. If you happen to aggravate R in any way, it walks the plank and does not come back, and you're going to have to relaunch Bioclipse. But things can only get better from here. Expect some Bioclipse/R integration soon, for example.

Update: Thanks to some impressive C hackery from kaskelot++, R no longer crashes and goes away forever when input is less than syntactical.


  1. Looking great! Going for away for the weekend, so won't have time to play with it!

    Integration is indeed the most important thing. Read BC resources, or just files from the workspace to start with. It would already be great if R would start with the workspace as root folder... What's the output of pwd()?

    Additionally, can it plot things? Have you tried image(x*y) ?

  2. @egonw:
    I agree about the workspace as the start directory... right now, running from within Eclipse, it seems that I get a directory somewhere under Eclipse.app/.

    Apart from that, I see no reason reading and writing of files shouldn't work right away. But even that won't reach its full potential until we can communicate data between R and the rest of Bioclipse.

    I tried image(x*y), and (predictably) nothing happens. At least R didn't die... We might add plotting sometime in the future, but right now, communication with R is through a text-only link.