IMLPlus Functionality for Interacting with R

IMLPlus provides the following functionality for interacting with R:

The SUBMIT Statement

To submit statements to R from within an IMLPlus program, use the SUBMIT statement with the R option. For example:

submit / R;
    R-statements
endsubmit;

The syntax for submitting statements to R is identical to the syntax for submitting statements to SAS except that you include the R option on the SUBMIT statement. For a full description of the SUBMIT statement, please refer to the topic The SUBMIT Statement.

Using the SUBMIT statement with the R option is a shorthand way of calling the method R.SubmitStatements. This is analogous to using a regular SUBMIT statement as a shorthand way of calling the method SAS.SubmitStatements.

The R Class

The R class represents the instance of R that is connected to an IMLPlus program. The R class provides the following methods for exchanging data between IMLPlus and R:

GetCharacterMatrix

GetMatrix

GetNumericMatrix

SetMatrix

The R class provides the following miscellaneous methods for interacting with R:

CopyCurrentPlotToOutputDocument

IsValidIdentifier

SubmitStatements

For additional information about the R class, please refer to the topic Class R.

Methods in the DataObject Class

The DataObject class provides the following methods for exchanging data between IMLPlus and R:

AddAnalysisVarFromR

AddAnalysisVarsFromR

AddVarFromR

AddVarsFromR

CreateFromR

ExportToR

Methods in the OutputDocument Class

The OutputDocument class provides the method PasteGraphic for pasting graphics from R into an IMLPlus LISTING output document.

IMLPlus Modules

IMLPlus provides the following modules for exchanging data with R:

ExportDataSetToR

ExportMatrixToR

ImportDataSetFromR

ImportMatrixFromR

IMPORTANT: These IMLPlus modules for exchanging data with client-side R have the same names and parameters as built-in IML subroutines that exchange data with server-side R. Be sure to use the RUN statement to invoke these IMLPlus modules and the CALL statement to invoke the built-in IML subroutines.