void ImportMatrixFromR( Matrix mData, String sRExpr )
Matrix mData
Upon return, contains an IML matrix in which the columns contain variables from the R data frame that resulted from evaluating sRExpr. If the first variable in the R data frame is a
numeric variable, the mData matrix is a numeric matrix in which the columns contain the numeric variables of the R data frame. If the first variable in the R data frame is a character
variable, the mData matrix is a character matrix in which the columns contain the character variables of the R data frame.
String sRExpr
An R expression that is evaluated and then coerced to a data frame.
This module evaluates an R expression and creates an IML matrix from the result. The module evaluates the R expression, coerces the result to an R data frame, and creates an IML matrix in which the columns contain variables from the data frame. If the first variable in the R data frame is a numeric variable, this module creates a numeric matrix in which the columns contain the numeric variables of the R data frame. If the first variable in the R data frame is a character variable, this module creates a character matrix in which the columns contain the character variables of the R data frame.
This module performs the same function as the method R.GetMatrix.
For information about how IML Studio transfers data from R to IMLPlus, please refer to the topic Data Exchange Details.
IMPORTANT: | This module imports data from client-side R. You must use the RUN statement to invoke this module because there is a corresponding built-in IML subroutine of the same name that imports data from server-side R. |
---|
submit / R; m <- ToothGrowth m endsubmit; run ImportMatrixFromR( x, "m" ); print x;