该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


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 Send( X );
S = "Report Title";
R Send( S );
M = [1 2 3, 4 5 6, 7 8 9];
R Send( M );
);
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:
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.
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)" );