DATA Step, Macro, Functions and more

Run R code inside SAS easily

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Run R code inside SAS easily

Hello!

 

Trying to run R code from SAS University Edition (UE).

As we know UE runs on server, whereas, R (for Windows) is installed on my local machine -- path:C:\Program Files\R\R-3.3.2\bin\R.exe

 

Q1: Can UE (in client/server environment) set a folder on client machine?  The following code does not set the path for 'work directory' appropriately. 

            A. setwd("/folders/myfolders/progs")

Note: The path given above is the UE mapped path to local folder C:\My_Work\SASUniversityEdition\myfolders\progs).

Note: Know that it is not working because later on in log it says: physical file is not there, when a file is referenced from that folder.

 

Whereas, the line below works...

            B. setwd("&workdir")

Note: WORK dir is on the UE server.

 

Q2: Can UE (in client/server environment) use NOXWAIT, XSYNC, PIPE?  Later on the code stops because of the following errors.  

            options noxwait xsync;

                --> ERROR: Unrecognized SAS option name NOXWAIT.  

                --> ERROR: Unrecognized SAS option name XSYNC.

            filename <fileref> pipe "&rpath"

                --> ERROR: Insufficient authorization to access PIPE.

                --> ERROR: Error in the FILENAME statement.

Note: Using 'File Shortcuts' in UE, rpath=%str(/folders/myshortcuts/R/R-3.3.2/bin/R.exe) 

 

Any help would be greatly appeciated!! 


Accepted Solutions
Solution
‎07-18-2017 08:58 AM
Community Manager
Posts: 2,772

Re: Run R code inside SAS easily

No, @AhmedAl_Attar is correct.  You cannot configure SAS University Edition to run R.  This requires a fully licensed version of SAS that you install yourself (for Windows or Linux).

 

If your goal is to reuse specific R packages, you might be stuck.  If your goal is to use certain capabilities that you know about in R but don't know about in SAS, you could post a "how do I..." question to the Statistical Procedures board or SAS/IML board here on the communities.

View solution in original post


All Replies
Regular Contributor
Posts: 213

Re: Run R code inside SAS easily

Hi,

 

SAS University Edition is a vApp (self-contained bundle of software & OS). for more details check this link SAS University Edition - FAQ

In the vApp, SAS is running on CentOS Linux. The NOXWAIT, XSYNC options are SAS windows options, and they are not valid for Linux.

 

In short, I don't think what you are asking for is possible!

If you had SAS running on a Linux server, then you would have the ability to install R on the same Linux server and intgerate the two software together on Linux.

 

I hope I'm wrong and someone can provide you with a positive alternative,

Ahmed

Solution
‎07-18-2017 08:58 AM
Community Manager
Posts: 2,772

Re: Run R code inside SAS easily

No, @AhmedAl_Attar is correct.  You cannot configure SAS University Edition to run R.  This requires a fully licensed version of SAS that you install yourself (for Windows or Linux).

 

If your goal is to reuse specific R packages, you might be stuck.  If your goal is to use certain capabilities that you know about in R but don't know about in SAS, you could post a "how do I..." question to the Statistical Procedures board or SAS/IML board here on the communities.

SAS Super FREQ
Posts: 3,489

Re: Run R code inside SAS easily

The FAQ for the SAS University Edition includes a list of features in SAS that are not supported in SAS UE. The third bullet is

  • The integration of SAS/IML with R is not supported.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 210 views
  • 2 likes
  • 4 in conversation