Eclipse with R, C++, & Latex

Setup Instructions

1. Download Eclipse


Click here and download the appropriate version of Eclipse Personally, I use the Stream Stable Build (See Descriptions). The Build Name is something like the version number, "3.3" and an identifying tag such as RC for "Release Candidate" or M and followed by another number e.g. "3.3RC1" or "3.4M2". Once you select the appropriate version, you'll still have to click through one or two pages - "Download Now Link" - before you're presented with a listing, by operating system type, for zip files containing the binaries. ( "eclipse-SDK-3.3RC1-win32.zip" )

2. Install Eclipse


I recommend unzipping the downloaded file to "C:\Programs\eclipse\". Linux based programs tend to not like having a space in the path. I also recommend right-clicking on the executeable "C:\Programs\eclipse\eclipse.exe" and selecting "Send To" -> Desktop and then drag the created shortcut to your location of choice (Start Menu, Quickstart Bar, etc.)



3. Starting Eclipse - First Time Only


The first time you start Eclipse, it will ask your for a workspace directory. Personally, I don't use the default location. I keep my workspace backed up on a separate hard disk. You can use multiple workspaces for different projects. This will improve loading time.




One small note: In keeping files backed up to a subversion repository, I've found it very difficult to sync the workspace directory. Eclipse is constantly adding and removing history files (Specifically the .metadata & .mylar directories).


4. Plug-ins


Eclipse works on a very user-friendly update system. Open the Help Menu, select "Software Updates", and choose the "Find and Install..." sub-option. Click on "Search for new features to install." Click Next.


In the dialog below, you have the option of entering in websites which Eclipse will query to download extensions and updates.




I recommend the following five plugins:

Please Note: The above links may change. They are current as of May 19th, 2007. Click on the plugin titles to visit their respective homepages. I also want to post examples of how I use the above plugins, but for now, refer to their respective homepages.

Check the "Europa Discovery Site" option, the "Eclipse Project Updates" option, and the "Automatically Select Mirrors" option. Then click on "New Remote Site" and fill in the dialog box for the plug-ins you selected. Make sure to check the box in the "Sites to include in search" window after you've entered the plugin information.




You are then presented with the results of your search for updates. Select the entire R (StatET) package, and the entire Latex (Texlipse) package. Select everything but the CSC Project plugin for Subversive. Personally, I only want to use Bugzilla for Mylar, so I've removed the other two integration options. I also expanded the "Europa Discovery Site" option and checked "C and C++ Development". I encourage you to check out some of the other packages in "Europa Discovery Site" option, though most of the plugins are for Java related development.




After clicking "Next" and agreeing to the respective licenses, Eclipse will automatically download everything you asked for. It will ask you if you're sure that you want to install these packages. Just click "Install All". This system was designed so that a computer administrator could download all needed packages to a central location and then install them repeatedly without needing to download them each time.

Eclipse will want to restart, which is a good idea. And now you're ready to code.

5. Usage & Examples


Coming Soon!!

Quick Notes:
  1. Close the Welcome dialog (X is next to the word Welcome).
  2. Click on the change perspective button in the upper right, and select "Other":

  3. Choose "StatET" from the Open Perspectives Dialog


  4. Right click in the Navigator pane and choose New->Project. Then select StatET->R-Project. Enter a name and click finish.
  5. Right click on the new project in the Navigator pane and choose New->"R-Script File". Name the file and start entering R code.
  6. To execute the R-code, click the and tell Eclipse where you installed the R software.
  7. Then click the submit icon and choose "Run R-Script via 'source'-command. This may not work if the focus isn't on your R-script file.


  8. Your R code should now be executing in the command window at the bottom of the Eclipse window.