1.
2.
Click Environment Variables.
4.
Type R_HOME for the Variable name.
5.
Type the path to the R .exe file (for example, C:\Program Files\R\R-2.15.3).
6.
Click OK and click OK again to close the System Properties window.
Create the variable using the JSL Set Environment Variable() function:
Set Environment Variable( "R_HOME", "C:\Program Files\R\R-2.15.3" );
2.
If the environment variable R_HOME does not exist, look up the InstallPath value in the Windows registry under the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R
For 32-bit R running on a 64-bit machine, the InstallPath value is in the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\R-core\R
If the InstallPath value exists, load R from the specified directory.
3.
If the InstallPath value does not exist, an error message states that R could not be found.
R Init( );
R Submit( "
	x <- 1:5
	x
" );
R Term( );
[1] 1 2 3 4 5

Help created on 7/12/2018