Calling Functions in the R Language


Transfer between SAS and R Data Structures

Many research statisticians take advantage of special-purpose functions and packages written in the R language. To call an R function, the data must be accessible to R, either in a data frame or in an R matrix. This section describes how you can transfer data and statistical results (for example, fitted values or parameter estimates) between SAS and R data structures.

You can transfer data to and from the following SAS data structures:

  • a SAS data set in a libref

  • a SAS/IML matrix

  • an IMLPlus DataObject

In addition, you can transfer data to and from the following R data structures:

  • an R data frame

  • an R matrix