I recently got a RFC on Eclipse and StatET setup from a R-help user, so here it is. Note: there may be slight errors of omission in my directions as I am making these notes after I had a successful install. If you have questions post here. Setup tested with Eclipse 3.4.0 on XP 32-bit and Eclipse 3.4.2 on Vista 32-bit. R 2.9.0 alpha. Installing StatET: 1. Go to Help > Software Updates... > Available Software > Add Site... > and type in: http://download.walware.de/eclipse-3.4 2. Select the packages you want and Install 3. Restart Eclipse - if successful, you should see StatET under Window Preferences... 4. Go to Window > Preferences > StatET > R Environments > Add... and enter a label for your R environment (eg R 2.9.0 alpha) and path (eg L:/bin/R/R-2.9.0alpha ) NOTE: I had some flaky issues with sending code in StatET when my path included spaces, so if you have issues, it is best to reinstall R in a path that contains no spaces. 5. In Eclipse, click on the Add Views icon in your toolbar and select Other> StatET6. In Eclipse, click on the Green Play Array Icon/Menu and and select Run Configurations... 6a. Enter a name for your run configuration (eg R 2.9.0 alpha ) 6b. Under the R Config tab, you should see your entry in 4. under Workbench default 6c. Enter a Working Directory, if you like 7. Reference for more details: http://www.splusbook.com/Rintro/R_Eclipse_StatET.pdf Installing Subversion (SVN Client): WARNING: Trust Tigris and their 0.7 & post 1.4-releases at your own risk. I spent several hours trying to get later versions to work, but they all failed to recognize SVNKit on my setups. Several other users have posted this issue. The solution is to install 1.4, which I will describe here. I assume that you already have an svn server setup on svn://svnserver 1. Help > Software Updates... > Add Site... > http://subclipse.tigris.org/update_1.4.x 2. Pick the packages you want (pay attention to required ones) and install 3. Right-Click on Project Explorer > Import > SVN > Checkout Projects from SVN > Next 4. Create a new repository location > type in something like svn://svnserver/subdir > Next 5. Select the folders you want > Finish IMPORTANT if you have problems with any version of Subversion: Check: Windows > Preferences > Team > SVN > SVN Interface or: Windows > Preferences > Team > SVN > Client Connectors Tab to make sure that under SVN Interface or Client Interface (depending on the version of the plug-in) that you have JavaHL (what I use) or SVNKit. If not, these could be the reasons: 1. You didn't select the interface package during the install 2. You are using a post 1.4 version (eg 0.7 or 1.5 and later) Installing RTools/HTML Compiler for Windoze users: This is useful for users of package inline or for users who want to compile their own packages using Rcmd 0. NOTE: you need to install perl and some tex (I use MikTex) before you install Rtools - follow their instructions. 1. Go to: http://www.murdoch-sutherland.com/Rtools/installer.html 2. Get Microsoft's HTML Compiler (to create chm) here: http://msdn.microsoft.com/en-us/library/ms669985(VS.85).aspx It's called htmlhelp.exe and includes hhc.exe 3. Follow instructions: important point - you should set your path to include RTools and you RHome/bin and to hhc directory (eg L:\Program Files\HTML Help Workshop\) 4. Test under Windows/cmd to make sure your setup works properly (eg Rcmd --help) If you manage to get RCmd working, you can go back to Eclipse and do this: 1. Click on Green Play Arrow With Red toolbox Menu > External Tools Configuration 2. In Package directory enter something like L:/dev/workspace/mypackage 3. IMPORTANT: Under Command: pick the right one! Like Add-On Package: Build In a small box to the right, you will see the RCMD to be executed. You DO NOT need to enter the name of your package under Options/Arguments - basically type everything here EXCEPT the name of your package. 4. CHECK if something is wrong: In the R Config tab, you should have your correct R Environment picked (eg R 2.9.0 alpha) - this is how the system knows which path to use to get to RCmd I hope someone finds this useful. Good luck! -- View this message in context: http://www.nabble.com/Eclipse-and-StatET-Howto-%28also-added-Subversion%2C-Rtools%29-tp22764049p22764049.html Sent from the R help mailing list archive at Nabble.com.
Duncan Murdoch
2009-Mar-29 10:37 UTC
[R] Eclipse and StatET Howto (also added Subversion, Rtools)
Thanks for posting these. One minor correction about Rtools installation below: On 28/03/2009 11:25 PM, Ken-JP wrote:> I recently got a RFC on Eclipse and StatET setup from a R-help user, so here > it is. > > Note: there may be slight errors of omission in my directions as I am making > these notes after I had a successful install. If you have questions post > here. > > Setup tested with Eclipse 3.4.0 on XP 32-bit and Eclipse 3.4.2 on Vista > 32-bit. > R 2.9.0 alpha. > > Installing StatET: > > 1. Go to Help > Software Updates... > Available Software > Add Site... > > and type in: http://download.walware.de/eclipse-3.4 > 2. Select the packages you want and Install > 3. Restart Eclipse - if successful, you should see StatET under Window > Preferences... > 4. Go to Window > Preferences > StatET > R Environments > Add... > and enter a label for your R environment (eg R 2.9.0 alpha) and path (eg > L:/bin/R/R-2.9.0alpha ) > > NOTE: I had some flaky issues with sending code in StatET when my path > included spaces, so if you have issues, it is best to reinstall R in a path > that contains no spaces. > > 5. In Eclipse, click on the Add Views icon in your toolbar and select Other >> StatET > 6. In Eclipse, click on the Green Play Array Icon/Menu and and select Run > Configurations... > 6a. Enter a name for your run configuration (eg R 2.9.0 alpha ) > 6b. Under the R Config tab, you should see your entry in 4. under > Workbench default > 6c. Enter a Working Directory, if you like > 7. Reference for more details: > http://www.splusbook.com/Rintro/R_Eclipse_StatET.pdf > > Installing Subversion (SVN Client): > > WARNING: Trust Tigris and their 0.7 & post 1.4-releases at your own risk. > I spent several hours trying to get later versions to work, but they all > failed to recognize SVNKit on my setups. Several other users have posted > this issue. The solution is to install 1.4, which I will describe here. I > assume that you already have an svn server setup on svn://svnserver > > 1. Help > Software Updates... > Add Site... > > http://subclipse.tigris.org/update_1.4.x > 2. Pick the packages you want (pay attention to required ones) and install > 3. Right-Click on Project Explorer > Import > SVN > Checkout Projects from > SVN > Next > 4. Create a new repository location > type in something like > svn://svnserver/subdir > Next > 5. Select the folders you want > Finish > > IMPORTANT if you have problems with any version of Subversion: > Check: Windows > Preferences > Team > SVN > SVN Interface > or: Windows > Preferences > Team > SVN > Client Connectors Tab > to make sure that under SVN Interface or Client Interface (depending on the > version of the plug-in) that you have JavaHL (what I use) or SVNKit. If > not, these could be the reasons: > 1. You didn't select the interface package during the install > 2. You are using a post 1.4 version (eg 0.7 or 1.5 and later) > > Installing RTools/HTML Compiler for Windoze users: > > This is useful for users of package inline or for users who want to compile > their own packages using Rcmd > > 0. NOTE: you need to install perl and some tex (I use MikTex) before you > install Rtools - follow their instructions.Rtools includes Vanilla Perl, so this is not needed any more. MikTeX is not included and I recommend it too, but it should be possible to work with no TeX installed, depending on what you want to do: you just won't be able to produce nice docs. Duncan Murdoch> 1. Go to: http://www.murdoch-sutherland.com/Rtools/installer.html > 2. Get Microsoft's HTML Compiler (to create chm) here: > http://msdn.microsoft.com/en-us/library/ms669985(VS.85).aspx > It's called htmlhelp.exe and includes hhc.exe > 3. Follow instructions: important point - you should set your path to > include RTools and you RHome/bin and to hhc directory (eg L:\Program > Files\HTML Help Workshop\) > 4. Test under Windows/cmd to make sure your setup works properly (eg Rcmd > --help) > > If you manage to get RCmd working, you can go back to Eclipse and do this: > 1. Click on Green Play Arrow With Red toolbox Menu > External Tools > Configuration > 2. In Package directory enter something like L:/dev/workspace/mypackage > 3. IMPORTANT: Under Command: pick the right one! Like Add-On Package: Build > In a small box to the right, you will see the RCMD to be executed. You DO > NOT need to enter the name of your package under Options/Arguments - > basically type everything here EXCEPT the name of your package. > 4. CHECK if something is wrong: In the R Config tab, you should have your > correct R Environment picked (eg R 2.9.0 alpha) - this is how the system > knows which path to use to get to RCmd > > I hope someone finds this useful. Good luck! > >
An update: after several days of struggling, I got StatET to work on Ubuntu 8.10 amd64, R 2.8.1. Here are some tips: 1. You may run into an X11 issue with tktcl in R as someone decided to omit /etc/X11/rgb.txt If you get weird issues with your R installation with window colors like "red" or "black", then you may be missing this file. Retrieve a copy off the web, and log in/out or restart your X. 2. When installing packages into R >DO NOT< use sudo or you will run into problems later on - particularly if your R packages automatically install into /home/myname/R/x86_64-pc-linux-gnu-library/2.8 3. I read of many problems with OpenJDK so uninstall that and install Sun's JDK instead (I think rJava may need Sun's JDK). Google around for instructions - it was safer to remove OpenJDK first. Make sure you get something reasonable when you do "java -version" and "R CMD javareconf" 4. Make sure you install the package rJava to completion - the system will build it ***5. Under Run configurations>JRE>VM Arguments you need something like this: -Drjava.path=/home/myname/R/x86_64-pc-linux-gnu-library/2.8/rJava I lost many hours with 5., but of course I didn't RTFM!!! Didn't need this one for Windoze, but needed it for Ubuntu. http://www.walware.de/goto/statet near the bottom... Note: There were probably other small steps during the install, but I didn't keep track. However, all solutions were found through googling... Of course, the advantage is, under amd64, we are no longer limited to 3GB of memory for R. Good luck! -- View this message in context: http://www.nabble.com/Eclipse-and-StatET-Howto-%28also-added-Subversion%2C-Rtools%29-tp22764049p22887711.html Sent from the R help mailing list archive at Nabble.com.
UPDATE on StatET and Ubuntu 8.10 amd64: StatET also works perfectly on Ubuntu 8.10 amd64, but the installation procedure takes a lot more effort than on XP Pro 32-bit or Vista 32-bit (at least from my experience). But I am very happy to have more RAM and having StatET working definitely helps the R-development experience. I also love the power of *nix, but like my experiences in the past, getting things to work right can be a big time-sink - it was the case with getting StatET working here. Some things to watch out for on Ubuntu 8.10 amd64 (you may or may not have the same issues): 1. Eclipse should be installed according to this procedure: http://flurdy.com/docs/eclipse/install.html You may get away with just setting ECLIPSE_HOME, but if you do nothing but unzip and run it, you may run into some weird run-time issues with StatET as described here: http://www.nabble.com/-SOLVED--Need-Help-with-StatET-Error-Bug--on-Ubuntu-8.10-amd64-td22905352.html 2. Follow my earlier post on this thread wrt rJava, -Drjava.path, and Sun JDK. Of course, there may be many different ways to get StatET working, but the steps in this thread worked for me. I posted these messages for others in appreciation of help that I got from other posted messages, but also for my future reference when I need to get StatET working on a newly-upgraded system. I hope someone finds this thread useful. - Ken -- View this message in context: http://www.nabble.com/Eclipse-and-StatET-Howto-%28also-added-Subversion%2C-Rtools%29-tp22764049p22907519.html Sent from the R help mailing list archive at Nabble.com.