R.SetMatrix

Prototypes

static void SetMatrix( String sRVarName, Matrix mData )

Parameters

String sRVarName
The name of the R variable to which the matrix will be assigned.

Matrix mData
The IML matrix containing the data to assign to the R variable.

Remarks

This method assigns an IML matrix to an R variable. After calling this method, the R variable will be a matrix.

For information about how IML Studio transfers data from IMLPlus to R, please refer to the topic Data Exchange Details.

Example
nm = { 11 12,
       21 22,
       31 32 };

cm = { "X1" "Y1",
       "X2" "Y2",
       "X3" "Y3" };

R.SetMatrix( "n1", nm );
R.SetMatrix( "c1", cm );

submit / R;
n1
c1
endsubmit;
See Also

R.GetCharacterMatrix
R.GetMatrix
R.GetNumericMatrix