1

I'm new to R and I use Eclipse a lot so I decided to install the StatET plugin in eclipse. Everything went smoothly except that I have the same problem as shown here...

Random true facts:
Windows XP Version 5.1.2600
Eclipse 3.6
StatET 0.9.2

I tried to install rj-0.5.2-1 from here, which is the package recommended for StatET 0.9.2. I put the tar.gz file in the same directory as R.exe and successfully installed it, here is the command line output...

H:\DATA\R\R-2.13.0\bin>R CMD INSTALL --no-test-load rj_*.tar.gz
* installing to library 'H:/DATA/R/R-2.13.0/library'
* installing *source* package 'rj' ...
** R
** inst
** preparing package for lazy loading
** help
No man pages found in package  'rj'
*** installing help indices
** building package indices ...
* DONE (rj)

H:\DATA\R\R-2.13.0\bin>

When it was done I could see the rj folder in the H:\DATA\R\R-2.13.0\library folder, so I thought it worked. However when I start Eclipse and start the RJ console I still get this error message...

[INFO] The R package 'rj' is not available, R-StatET tools cannot be initialized.

I also tried installing the rj-0.5.5-3 package since the binaries are precompiled; however, that didn't work either. I still get the same error message.

I noticed that at the bottom of the stackoverflow page I posted above that there is a post by Allan Stokes that states this error message is not true. Is this correct? How can I tell if this error message is a Eclipse/StatET bug or that my rj package is not installed properly? Any ideas?

Community
  • 1
  • 1
b10hazard
  • 7,399
  • 11
  • 40
  • 53
  • Have you also installed rJava? Here is a useful guide and checklist for installation: http://flyordie.sin.khk.be/statet/ Good luck. – Andrie Jun 08 '11 at 15:16
  • Yes, I installed rJava. I am certain that rJava is functioning properly because when I first installed StatET I could not start a RJ console without getting a popup indicating that I needed rJava. After I installed rJava the RJ console started with no popups. The only problem I have now is the error message saying package 'rj' is not available. I followed the link you posted, I have already done everything shown on that page. – b10hazard Jun 08 '11 at 19:26
  • I found that this message occurs when the rj package isn't found. I ran the following command at the r command prompt... '("rj" %in% installed.packages()[,"Package"])' and the r command prompt returned a FALSE message. However, my installation of rj did not indicate any errors. – b10hazard Jun 09 '11 at 14:33

1 Answers1

3

Not sure if it is allowed to answer your own question, but I managed to get it working and I thought I'd post my solution. For some reason R was not recognizing the rj library when it was installed on my H: drive which is a portable drive, not my system drive. I uninstalled R and reinstalled it on my C: drive, which is my system drive. I installed rJava and rj just like before and in the r console I ran...

("rj" %in% installed.packages()[,"Package"])

it returned true indicating that the package was there, this command returned false when R was installed on my H: drive. I went into Eclipse/StatET and setup my R environment with the new location of R and ran RJ and there was no error. I'm not sure why this solution worked. Maybe the rj package need to be installed in a very specific manner. I don't understand why some libraries worked on the H: drive and some didn't. The rJava package would work on the H: drive and that the rj package wouldn't. Why is this? Ah well, it's working now. The info on this mailing list helped a lot...

http://lists.r-forge.r-project.org/pipermail/statet-user/2011-March/000812.html

b10hazard
  • 7,399
  • 11
  • 40
  • 53