What versions of R are supported by SAS?


SAS 9 has supported calling R from the SAS/IML language since 2009. The interface to R is part of the SAS/IML language. However, there have been so many versions of SAS and R since 2009, that it is hard to remember which SAS release supports which versions of R. The following table lists recent SAS releases and the versions of R that each supports. Rick Wicklin tries to keep this page up to date as new versions of SAS 9 and R are released.

UPDATE: The current version of SAS supports R 4.4.0. For some older versions of SAS, you must download a hot fix to use the latest version of R. In the following table, an asterisk indicates that a hot fix is required. Details are provided in the section "Incompatible Versions."

Compatibility with R Releases
SAS Version PROC IML SAS/IML Studio Release Date R Versions
9.2N/A3.2Jul 20092.6.1 - 2.11.1 20102.9.1 - 2.11.1 20112.9.1 - 2.15.3
9.3M212.112.1Aug 20122.9.1 - 2.15.3
9.412.312.3Jul 20132.13.0 - 3.0.1
9.4M113.113.1Dec 20132.13.0 - 3.2.5
9.4M213.213.2Aug 20142.13.0 - 3.2.5
9.4M314.114.1Aug 20152.13.0 - 3.2.5
9.4M414.214.2Nov 20162.13.0 - 3.6.3
9.4M514.314.3Sep 20172.13.0 - 3.6.3*
9.4M615.115.1Nov 20182.13.0 - 3.6.3*
Hot Fix*14.3-15.2Feb 2021R 4.0.x
9.4M715.2N/AAug 20204.0.0* - 4.4.0
9.4M815.3N/AAug 20224.0.0 - 4.4.0

In addition, SAS IML on SAS Viya supports the latest version of R.

Incompatible Versions

SAS ensures that each SAS release supports backward compatibility with as many previous R releases as possible. However, after a version of SAS ships, it is impossible to ensure forward compatibility. To date, the following releases of R broke compatibility with a prior SAS release:

  • R 4.3.0 broke compatibility when it eliminated default.stringsAsFactors(). Some R programs might give the error ERROR: R: 'default.stringsAsFactors' is defunct. You can read the R Core Team's reasons for eliminating the function. SAS has fixed the problem in SAS IML on Viya. You can download a hotfix for SAS 9.4M7 and 9.4M8 from Note 70253.
  • R 4.0 broke compatibility with all SAS releases on Linux. When you try to run R from SAS/IML, you might get error messages that include "ERROR: The final R statement is incomplete" and "ERROR: SAS is unable to transcode character data to the R encoding." You can download a hot fix that resolves the issue for SAS 9.4 M5, M6, and M7. The problem is fixed in SAS 9.4M8.
  • On Windows, R 3.3.0 broke compatibility with SAS/IML 14.1 (SAS 9.4m3) and earlier releases. The interface works on Linux. R 3.3.0 requires Red Hat Linux (RHEL) 7.1, so SAS customers who run an older Linux release might need to upgrade the operating system before they can compile R 3.3.0.
  • R 3.0.2 changed an internal detail that SAS was using. SAS/IML 13.1 supports R 3.0.2.
  • R 3.0.0 changed certain aspects of the external API to R. To use R 3.0.0 or later you must use SAS 9.4 or later.
  • R 2.12.0, which introduced 64-bit R, changed the locations of certain libraries. To use R 2.12.0 or later, you must use SAS 9.3 or later.

An error message that you might see because of incompatible versions is "An installed version of R could not be found," although this message can also occur for other reasons.

Some software companies distribute their own versions of R, but SAS does not. Consequently, if the interface to R changes, SAS customers need to use a compatible version of R until they can update their version of SAS.

32-bit and 64-bit versions of SAS and R

I'll close with a few comments about 32-bit and 64-bit versions of SAS and R.

  • If you are using a version of SAS/IML prior to 9.3, you must install a 32-bit version of R. If you are using SAS/IML 9.3 or later, read on.
  • If you are using SAS software on a 32-bit edition of Windows, you must install the 32-bit edition of R.
  • If you are using SAS software on a 64-bit edition of Windows, you can install either the 32-bit or the 64-bit edition of R. The 32-bit edition of SAS looks first for the 32-bit edition of R and then for the 64-bit edition. The 64-bit edition of SAS looks first for the 64-bit edition of R and then for the 32-bit edition.

Anaconda R

Since this article was published, some companies have tried to interface between SAS and Anaconda R on Linux. SAS does not support Anaconda R. SAS supports R that is installed and built from the CRAN source.


About Author

Rick Wicklin

Distinguished Researcher in Computational Statistics

Rick Wicklin, PhD, is a distinguished researcher in computational statistics at SAS and is a principal developer of SAS/IML software. His areas of expertise include computational statistics, simulation, statistical graphics, and modern methods in statistical data analysis. Rick is author of the books Statistical Programming with SAS/IML Software and Simulating Data with SAS.


  1. Vadim Bondarenko on


    If I still have several versions of R installed on my Windows machine, is it possible to have SAS call an older (compatible) version of R, instead of the most current one? Thanks.

    • Rick Wicklin

      Yes. If the environment variable R_HOME exists, SAS/IML loads R from the specified directory. So set R_HOME to point to the root directory of the R installation that you want (NOT the "bin" subdirectory).

  2. Pingback: Twelve advantages to calling R from the SAS/IML language - The DO Loop

  3. Eric Rexstad on


    Any predictions about upcoming versions of SAS/IML particularly with respect to the R interface? I'm doing my annual negotation with our university IT department regarding software to install for the 2014/15 academic year.

    Last year we got caught in the trap of having SAS 9.3 and R 3.0 meaning I could not teach students about calling R from SAS/IML. At the moment current R is 3.1.0 (with no planned date for the next release) and current SAS is 9.4m1; if I am correct. I presume those two are compatible; can you confirm?

    Are there plans for a summer SAS release?

  4. Robert Wasicak on


    I have Eminer 13.1 and R 3.1.1, but I don't have IML, can I run R using the Open Source Integration node? If so you have a simple example for this? I have my R_HOME set to the R directory and have the -RLANG set in my sasv9.cfg, but it's not working.

  5. Hi Rick,

    Think I need some help? I had the 9.3 version, and now switched to the new 9.4. It was working fine when calling R with SAS/IML studio 3.4. Now I have the 13.2, and I have the sentence :
    "An installed version of R could not be found. (+2, 16)"
    But it is on the computer. As reported in your table I check and changed R versions, but it is always the same.......
    Any ideas will be welcome. Is there a way to define the directory in which R is installed ?


  6. Rick - any chance at getting a "last updated date:" and/or a "highest version of R tested:" field in the table/post above? You're clearly updating it, but it would be helpful to know the last time it was updated to know whether we need to verify a particular version or not. (Or, the presumably sourced-from-here KB article could have the same thing - by the way, that kb article is slightly out of date versus this.) Thanks!

    • Rick Wicklin

      In the table, "present" means the latest release. When each version of R is released, we run a suite of SAS/IML tests and this post is updated within a few days if anything changes.

      • I understand that, but the problem is that it's not obvious what "present" corresponds to - it's not obvious to a reader that the version on the R website is definitively tested (and if you took a few weeks off to go to the Cayman Islands, and R released a new version during that time, it would be hard to know that it was tested). It's helpful on lists like this to have a "last updated" date and/or a "last tested version" number to make that more clear, particularly to someone who doesn't read down in the comments.

  7. Robert Feyerharm on

    My company currently uses SAS Enterprise Guide on a dedicated SAS server. After installing SAS/IML on out server, would we then need to separately install R or can we already call R with proc iml?

    I've inquired with my company's IT Dept about installing R on our SAS server, but was told it wasn't possible (or would be very difficult).

  8. Hi, I am getting this message “tkrproxy64.exe has stopped working” while using proc iml statement to read large R data file in SAS (9.4). Can anyone tell why I am getting this message. Thanks

Leave A Reply

Back to Top