<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Running R in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979622#M378827</link>
    <description>&lt;P&gt;It seems to be related to something amiss in the R installation.&amp;nbsp; Will you try reinstalling R and seeing if that helps?&amp;nbsp; If it does not fix the problem, then please open a support request with Technical Support.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/en/technical-support/submit-a-support-request.html" target="_blank"&gt;Submit a Support Request | SAS Support&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Nov 2025 16:07:15 GMT</pubDate>
    <dc:creator>SAS_Rob</dc:creator>
    <dc:date>2025-11-26T16:07:15Z</dc:date>
    <item>
      <title>Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979535#M378806</link>
      <description>&lt;P&gt;I am trying to run R script within SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Windows 10, x64 environment&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;R version 4.5.1&lt;/LI&gt;
&lt;LI&gt;SAS version 9.4M8&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I have followed examples previously published including:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://pharmasug.org/proceedings/2019/ST/PharmaSUG-2019-ST-149.pdf" target="_blank"&gt;https://pharmasug.org/proceedings/2019/ST/PharmaSUG-2019-ST-149.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-Run-R-code-inside-SAS-easily/td-p/210116" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-Run-R-code-inside-SAS-easily/td-p/210116&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears to be set up correctly&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    proc options option=rlang;
2    run;

    SAS (r) Proprietary Software Release 9.4  TS1M8

 RLANG             Enables SAS to execute R language statements.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, when I attempt to run R script, I get an error message regarding the R package 'stats'.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;4    proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
5        submit / R;
6        endsubmit;
WARNING: R: During startup - Warning message:
WARNING: R: package 'stats' in options("defaultPackages") was not found
ERROR: R: Error in is.ts(a) : could not find function "is.ts"
ERROR: SAS is unable to transcode character data to the R encoding.

 statement : SUBMIT at line 5 column 5
7    quit;
NOTE: Exiting IML.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IML used (Total process time):
      real time           2.56 seconds
      cpu time            0.75 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 'stats' package appears to be installed and runs fine within RStudio. The is.ts function seems to be associated with time series analysis, although that really has nothing to do with the SAS PROC IML script above.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any thoughts or suggestions on resolving this error would be appreciated. Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 13:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979535#M378806</guid>
      <dc:creator>cminard</dc:creator>
      <dc:date>2025-11-25T13:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979543#M378813</link>
      <description>&lt;P&gt;What is your SAS session encoding?&lt;/P&gt;
&lt;P&gt;Looks like it may be different than R's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 15:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979543#M378813</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-11-25T15:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979544#M378814</link>
      <description>&lt;P&gt;I'm not familiar with SAS "encoding".&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;10   proc options option=encoding;
11   run;

    SAS (r) Proprietary Software Release 9.4  TS1M8

 ENCODING=WLATIN1  Specifies the default character-set encoding for the SAS session.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Nov 2025 15:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979544#M378814</guid>
      <dc:creator>cminard</dc:creator>
      <dc:date>2025-11-25T15:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979545#M378815</link>
      <description>&lt;P&gt;also R_HOME may help:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options option=RLANG;
run;
options set=R_HOME="/path/to/R/R-4.3.1/";
PROC IML;
  submit / R;
  endsubmit;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;this hot-fix helped me too:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/70/253.html" target="_blank"&gt;https://support.sas.com/kb/70/253.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 15:48:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979545#M378815</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-11-25T15:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979546#M378816</link>
      <description>&lt;P&gt;try to run SAS in UTF-8, it's called "SAS (Unicode Support)"&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 15:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979546#M378816</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-11-25T15:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979575#M378818</link>
      <description>&lt;P&gt;Thank you for the suggestions. Unfortunately, I still get the same error messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;9    proc options option=encoding; run;

    SAS (r) Proprietary Software Release 9.4  TS1M8

 ENCODING=UTF-8    Specifies the default character-set encoding for the SAS session.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


10   proc options option=rlang; run;

    SAS (r) Proprietary Software Release 9.4  TS1M8

 RLANG             Enables SAS to execute R language statements.
NOTE: PROCEDURE OPTIONS used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


11
12   proc iml;
NOTE: IML Ready
13       submit / R;
14       endsubmit;
WARNING: R: During startup - Warning message:
WARNING: R: package 'stats' in options("defaultPackages") was not found
ERROR: R: Error in is.ts(a) : could not find function "is.ts"
ERROR: SAS is unable to transcode character data to the R encoding.

 statement : SUBMIT at line 13 column 5
15   quit;
NOTE: Exiting IML.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IML used (Total process time):
      real time           0.54 seconds
      cpu time            0.03 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The R_HOME path is already set in the config file. I did try running the options statement that you suggested anyway, but that did not resolve the issue either.&lt;/P&gt;
&lt;P&gt;I will continue browsing the hot-fixes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 18:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979575#M378818</guid>
      <dc:creator>cminard</dc:creator>
      <dc:date>2025-11-25T18:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979596#M378819</link>
      <description>Calling &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2023/01/09/install-r-sas-viya.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2023/01/09/install-r-sas-viya.html&lt;/A&gt;</description>
      <pubDate>Wed, 26 Nov 2025 07:16:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979596#M378819</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-11-26T07:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979617#M378826</link>
      <description>&lt;P&gt;We saw this issue in 2024, but I was not involved in investigating the problem. Perhaps&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/155173"&gt;@SAS_Rob&lt;/a&gt;&amp;nbsp;has information about the cause or resolution.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 15:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979617#M378826</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2025-11-26T15:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979622#M378827</link>
      <description>&lt;P&gt;It seems to be related to something amiss in the R installation.&amp;nbsp; Will you try reinstalling R and seeing if that helps?&amp;nbsp; If it does not fix the problem, then please open a support request with Technical Support.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/en/technical-support/submit-a-support-request.html" target="_blank"&gt;Submit a Support Request | SAS Support&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 16:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979622#M378827</guid>
      <dc:creator>SAS_Rob</dc:creator>
      <dc:date>2025-11-26T16:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979628#M378828</link>
      <description>&lt;P&gt;Uninstalled R and RStudio. Downloaded and reinstalled.&amp;nbsp;There is a newer version of R (4.5.2) which I installed. Updated config but still get the same error in SAS. Weighing whether or not to reinstall SAS. There is a new version of SAS (9.4M9), but not sure that would make a difference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Technically, it does not appear that SAS officially supports R version 4.5.2 (or 4.5.1) yet.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2013/09/16/what-versions-of-r-are-supported-by-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2013/09/16/what-versions-of-r-are-supported-by-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 18:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979628#M378828</guid>
      <dc:creator>cminard</dc:creator>
      <dc:date>2025-11-26T18:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Running R in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979631#M378829</link>
      <description>&lt;P&gt;They do work together:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yabwon_0-1764183314305.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/111600i2B16C82A6011091D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yabwon_0-1764183314305.png" alt="yabwon_0-1764183314305.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 18:55:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-R-in-SAS/m-p/979631#M378829</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2025-11-26T18:55:30Z</dc:date>
    </item>
  </channel>
</rss>

