0

I'm trying to run R in the Eclipse environment.

I have followed all the necessary instructions from A Guide to Eclipse and the R Plugin in StatET [http://www.splusbook.com/RIntro/R_Eclipse_StatET.pdf] however am coming up with the following Error;

Launching the R Console was cancelled, because it seems starting the R engine failed. Please make sure that R package 'rj' (2.0 or compatible) is installed and that the R library paths are set correctly for the R environment configuration 'R'.

Debug

I have installed RJ 1.1 as directed on one site, then installed 2.0. I dragged the contents of the zip into the library.

This is the image of the Environmental settings;

enter image description here

The interaction ...

enter image description here

The Java ...

enter image description here

And the installation of RJ 1.1 in the library;

C:\Program Files\R\R-3.1.2\library\rj

I have also followed this route of installation, RJava Eclipse Plugin as it seemed that Java was incorrectly installed, following the Error Details.

I'm stuck. I can't seem to figure out what is going on. Does anyone have any ideas?

Thanks, WEJ

  • You have to install rj from an off-CRAN resource. See the [installation page](http://www.walware.de/goto/statet) for more instructions. It's using the same `install.packages` but uses a different repository. Dragging the contents of a zip file (anywhere) is unlikely to install the package correctly. – Roman Luštrik Nov 24 '14 at 14:32
  • Hi Roman. Thanks for the feedback. I tried as you said and downloaded a zip folder which I installed via RStudio. I then checked where that the installation had been made, which it had. That made me realize that I have two folder for R. One in User/Documents and another in the Programe Files. I went back into set up in Eclipse and changed the file path to the User/Documents path rather then the files. This still hasn't worked. Do you have any further advice / does the above info shine any light on my problem? –  Nov 24 '14 at 16:45
  • I don't understand why you insist on installing from zip. Just type (assuming you have the latest version) `install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-2.0")` and have Eclipse auto-detect everything. – Roman Luštrik Nov 25 '14 at 08:32
  • Hi Roman. I should have detailed this before. I have installed the package for 1.1 & 2 in the method you have described above before I tried the drag and drop ... still no luck. Best, WEJ –  Nov 25 '14 at 09:25

2 Answers2

1

I've managed to resolve the issue however am unsure exactly how, one of the options below was effective so I'd recommend trying them all to anyone with a similar problem.

  1. Check the install location of rj.gd. If you for some reason, like I did, have two locations, check that the required files are in the location Eclipse is automatically selecting. If there not, put them there, however as Roman points out make sure these are correctly installed.
  2. Re-start your PC after installation, not just the program.

It was one of those, so good luck.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
0

It could also be that you have had the wrong version of rj. The following should fix it:

remove.packages(c("rj", "rj.gd"))
install.packages(c("rj", "rj.gd"), repos="http://download.walware.de/rj-2.0", type = "source")
qed
  • 22,298
  • 21
  • 125
  • 196