Configuring SAS to run R Code
Refer to the SAS Help Center: Calling Functions in the R Language for details how to run R code within SAS.
You need to download and install R onto your workstation
Using Notepad, edit the file C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg and add the following near the top of the file (replacing the “C:\Program Files\R\R-4.4.0” text with the location where your current version of R is installed):
/* Allow R code to run */
-RLANG
-SET R_HOME "C:\Program Files\R\R-4.4.0"
Test the installation by starting SAS and then copy/paste the code from SAS Help Center: Submit R Statements into a new program window and run the code.