Equivalent 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.
R Init();
X = 1;
R Send( X );
S = "Report Title";
R Send( S );
R Send( M );
R Submit( "
" );
R Term();
Equivalent 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.
Here:x = 1;
::y = 2;
z = 3;
R Init(); // Initiate the R connection
R Send( Here:x );
R Submit( "print(Here.x)" );
R Send( ::y ); // ::y creates the R object y
R Submit( "print(y)" );
R Send( Here:x, R Name( "localx" ) );
R Submit( "print(localx)" );
R Send( z ); // z creates the R object z
R Submit( "print(z)" );