For the latest version of JMP Help, visit JMP.com/help.


Publication date: 06/21/2023

Install R

Install R on the same computer as JMP. You can download R from the Comprehensive R Archive Network website:

https://cran.r-project.org

Note: For macOS Catalina and later versions, download the notarized and signed package.

Because JMP is a 64-bit application, you must install the corresponding 64-bit version of R. For the supported version of R, see the system requirements on the JMP website: https://www.jmp.com/system.

Override the Default R Install Location on Windows

Normally JMP determines the R_HOME environment variable internally if it is not defined in the Windows system registry:

computer\HKEY_LOCAL_MACHINE\SOFTWARE\R-code\R\InstallPath

You might have installed more than one version of R on your computer. To override the default R installation location, define the R_HOME environment variable using either of the two following methods:

1. Create the variable in your system environment variables using the Control Panel, select Start > Control Panel > System > Advanced system settings.

2. Click Environment Variables.

3. In the System variables pane, click New.

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.

or

Create the variable using the JSL Set Environment Variable() function:

Set Environment Variable( "R_HOME", "C:\Program Files\R\R-2.15.3" );

Override the Default R Install Location on macOS

You might have installed more than one version of R on your computer. To use an older version, change the R_HOME environment variable to point to the R version that you want to use.

To specify the R_HOME location, follow these steps:

1. Open a terminal window.

2. Type the following code, where value is the location of R.

export R_HOME=value

3. Press Enter.

How JMP Finds R on Windows

JMP delays loading R until a JSL-based script requires access to it. When JMP needs to load R, it follows the standard steps for finding R on a Windows computer:

1. Look up the environment variable R_HOME.

If the variable exists, load R from the specified directory.

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

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.

How JMP Finds R on macOS

JMP uses the value of the R_HOME environment variable if the variable exists. Otherwise, it looks in /Library/Frameworks/R.framework/Versions/Current/Resources for R.

Testing Your Setup

To test that your computer is able to run JSL-based scripts that use R, run the following JSL script:

R Init( );
R Submit( "
	x <- 1:5
	x
" );
R Term( );

You should see the following output in the log:

[1] 1 2 3 4 5

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).