Important Notice !!!

This blog has been discarded and no update any more.

Please visit http://www.quantlego.com for active updates.

Sorry for any inconvenience.





Thursday, July 18, 2013

Configure Eclipse IDE to work for both 32-bit and 64-bit R

| |
Sometime we need to make Eclipse compatible simultaneously for both 32-bit and 64-bit versions of R. For example, we may have the 64-bit R as the default configuration. However, if we want to run the odbcConnectExcel function which only works under 32-bit scenary, we have to switch the current active configuration to 32-bit R. This tutorial tells how to make two configurations of 32-bit and 64-bit R coexist in one Eclipse IDE.
  1. When install R, install both 32-bit and 64-bit versions.

  2. Install Jave Runtime Environment (JRE), both 32-bit and 64-bit. Download both versions and install them respectively, using their default installation folders, so
    • 32-bit JRE automatically goes to folder C:\Program Files (x86)\Java\jre7
    • 64-bit JRE goes to folder C:\Program Files\Java\jre7.
  3. Set up two versions of JREs in Eclipse

  4. Set up two R environments in Eclipse

    Menu: Run --> Preferences --> StarET --> Run/Debug --> R Environments , assigning different names for different R environments (note: the R_HOME location are same for both environments)



    The most important setting here is that the 'Architecture' fields for the two environments have to be set as x86_64 and x86, respectively.

  5. Create two R consoles in Eclipse<>

    Menu: Run --> Run Configurations --> R Console, right click 'New' to create two R consoles, as shown below



    Make sure to set correct versions of the R environments and JRE in the corresponding R consoles



  6. To activate one R console, Run --> Run Configurations --> R Console --> Choose one console and click 'Run' button....that's it !!!

0 comments:

Post a Comment

Powered by Blogger.