全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1006 1
2020-12-02
悬赏 5 个论坛币 未解决
各位大侠,我用Proc IML调用R的时候,出现下面的问题,如何解决呢? 换一台电脑跑同样的程序,是没有报错的


   proc options option=rlang;

2    run;

    SAS (r) Proprietary Software Release 9.4  TS1M4

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


3
4    option set=R_HOME='C:\Program Files\R\R-4.0.2';

5
6    proc iml;
NOTE: Writing HTML Body file: sashtml.htm
NOTE: IML Ready
7    /* Comparison of matrix operations in IML and R */
8    print "----------  SAS/IML Results  -----------------";
9    x = 1:3;
9  !                                          /* vector of sequence 1,2,3 */
10   m = {1 2 3, 4 5 6, 7 8 9};
10 !                                          /* 3 x 3 matrix */
11   q = m * t(x);
11 !                                          /* matrix multiplication */
12   print q;
13   print "-------------  R Results  --------------------";
14   submit / R;
15     rx <- matrix( 1:3, nrow=1)             # vector of sequence 1,2,3
16     rm <- matrix( 1:9, nrow=3, byrow=TRUE) # 3 x 3 matrix
17     rq <- rm %*% t(rx)                     # matrix multiplication
18     print(rq)
19   endsubmit;
ERROR: SAS is unable to transcode character data to the R encoding.
ERROR: The final R statement is incomplete.
ERROR: The final R statement is incomplete.
ERROR: The final R statement is incomplete.
ERROR: The final R statement is incomplete.

statement : SUBMIT at line 14 column 1
20
21   quit;


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2021-2-12 21:12:27
R改安装3.6.3的版本看看,也许是机子无法调用到高版本的R
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群