You will need to set three environment variables so that the JGR launcher knows where R is.

  1. Set R_HOME to the location of the R installation.
  2. Set R_LIBS to the location of your package library directory.
  3. Set DYLD_LIBRARY_PATH to the directory containing your R dynamic library (i.e. on the mac, the folder containing libR.dylib)

Mac Example

For example I installed R-2.10.1 to my user folder running mac os x. I use the following script (named startJGR and put in the same folder as JGR.app) to start up JGR.

setenv R_LIBS $HOME"/R-2.10.1/library"
setenv R_HOME $HOME"/R-2.10.1"
setenv DYLD_LIBRARY_PATH $HOME"/R-2.10.1/lib"
setenv NOAWT 1
./JGR.app/Contents/MacOS/JGR

to run this script, at the terminal (while in the same directory) I run: csh ./startJGR

if you get a permission error, run chmod 755 startJGR

Windows example

in windows, the launcher jgr.exe also accepts some parameters to specify R's location. for example if I have a custom library location in my documents directory, I can create a file names launchJGR.bat, located in the same folder as jgr.exe containing the text:

set R_LIBS=%USERPROFILE%\Documents\R\win-library\2.11
jgr.exe --libpath=%USERPROFILE%\Documents\R\win-library\2.11