Because JMP is supported as both a 32-bit and a 64-bit Windows application, you must install the corresponding 32-bit or 64-bit version of R. For the supported version of R, see the system requirements on the JMP website: https://www.jmp.com/support/system_requirements_jmp.shtml
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.
|
4.
|
Type R_HOME for the Variable name.
|
5.
|
6.
|
Create the variable using the JSL Set Environment Variable() function:
1.
|
Look up the environment variable R_HOME.
|
2.
|
If the environment variable R_HOME does not exist, look up the InstallPath value in the Windows registry under the following key:
|
For 32-bit JMP running on a 64-bit machine, the InstallPath value is under the following key:
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.
|
The R interfaces are also scriptable using an R connection object. A scriptable R connection object can be obtained using the R Connect() JSL function.
Equivalencies Between JMP and R Data Types for R Send( ) shows what JMP data types can be exchanged with R using the R Send( ) function. Sending lists to R recursively examines each element of the list and sends each base JMP data type. Nested lists are supported.
Equivalencies Between JMP and R Data Types for R Get( ) shows what JMP data types can be exchanged with R using the R Get( ) function. Getting lists from R recursively examines each element of the list and sends each base R data type. Nested lists are supported.
A JMP object sent to R using R Send() uses the same JMP reference as the name of the R object that gets created. For example, sending the JMP variable dt to R creates an R object named dt. The colon and double colon scoping operators (: and ::) are not valid in R object names, so these are converted as follows:
The R Name() option to R Send() has an argument that is a quoted string that contains a valid R object name. The JMP object sent to R becomes an R object with the name specified. For example:
This example creates a variable x in the Here namespace, a variable y in the global namespace, and a variable z that is not explicitly referenced to any namespace. The variable z defaults to Global unless Names Default To Here(1) is on. These variables are then passed to R.
On Windows, if you want to record output to the graphics window, send the following R code using R Submit( ).
In the following example, the list that is created in R has two elements named x and y that are created using the List() function of R. When your bring the R list into JMP and then send it back to R, the names are lost. Therefore in R, you cannot access the first matrix using pts$x. Instead, you must use the index using pts[[1]].
See the file JMPtoR_bootstrap.jsl in the sample scripts folder for an example script.
The boot package in R is used to call the boot() function and the boot.ci() function to calculate the sample statistic for each bootstrap sample and the bootstrap confidence interval.