The SUBMIT and ENDSUBMIT statements also provide an interface to the R statistical programming language, so that you can submit R statements from within your SAS/IML program. To submit statements to R, specify the R option in the SUBMIT statement.
You can transfer data from SAS/IML matrices and SAS data sets into R matrices and R data frames, and vice versa. Specifically, the following subroutines are available to transfer data from a SAS format into an R format:
Subroutine |
SAS Source |
R Destination |
---|---|---|
SAS data set |
R data frame |
|
SAS/IML matrix |
R matrix |
In addition, the following subroutines are available to transfer data from an R format into a SAS format:
Subroutine |
R Source |
SAS Destination |
---|---|---|
R expression |
SAS data set |
|
R expression |
SAS/IML matrix |
In Table 1.2, an "R expression" can be the name of a data frame, the name of a matrix, or an expression that results in either of these data structures.