BookmarkSubscribeRSS Feed
Obsidian | Level 7

Hi folks,
We've just installed anaconda 2 on our SAS Linux server (running RedHat). After the anaconda installation was completed,
we tested the R installation through R commands and works fine:


R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-conda_cos6-linux-gnu (64-bit)

> print("Hello World")
[1] "Hello World"
> R.home()
[1] "/opt/sas/iml/anaconda2/envs/sas-r-default/lib/R"

We added the RLANG command and the R_HOME on sasv9.cfg. We verified the settings:

27 /* rlang set ?*/
28 proc options option=rlang;
29 run;

SAS (r) Proprietary Software Release 9.4 TS1M6

RLANG Enables SAS to execute R language statements.
NOTE: PROCEDURE OPTIONS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

31 /* R Home set ? */
32 data _null_;
33 R_HOME =sysget("R_HOME");
34 put R_HOME=;
35 run;

NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

After that, we tried to validate if we could call and execute R through SAS EG using:

proc iml;
submit /R;
print("Hello World!")

But the proc iml does not terminate in the SAS Enterprise Guide and I do not see on the server that an R process was started.

Any Idea?

Kind Regards,



A few comments:

1. Your PROC OPTIONS step does not tell us anything. You need to add the VALUE option to make sure the RLANG option is actually set:
proc options option=rlang value; run; 

2. SAS does not officially support the Anaconda distribution of R, but I was able to provide some tips and suggestions for another SAS user who wanted to call Anaconda R from SAS. The previous user was using Windows, but see the thread



Obsidian | Level 7

Thanks Rick for the quick feedback....


1) Output from Proc Options:

26 /* rlang set ?*/
27 proc options option=rlang value;
28 run;

SAS (r) Proprietary Software Release 9.4 TS1M6

Option Value Information For SAS Option RLANG
Value: RLANG
Scope: SAS Session
How option value set: Config File
Config file name:


2) PATH-Variable 

 We have set the PATH variable in the sasenv_local:

  • export PATH=/opt/sas/iml/anaconda2/envs/sas-r-default/bin:$PATH

 but unfortunately the behaviour is the same. It seems that SAS cannot call R....






Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 3 replies
  • 3 in conversation