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:
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.
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:
For example, sending nsref:dt to R creates a corresponding R object named nsref.dt.
For example, sending ::dt to R creates a corresponding R object named dt.
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.
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.