1
votes

I copy pasted the code from this page on calling R in SAS IML

I got the errors below. I don't know why ExportmatrixtoR and Submit are giving me problems. Help?

6 proc iml;
NOTE: IML Ready
7 q = {3.7, 7.1, 2, 4.2, 5.3, 6.4, 8, 5.7, 3.1, 6.1, 4.4, 5.4, 9.5, 11.2};
8 RVar = "rq";
9 run ExportMatrixToR( q, RVar );
ERROR: Invocation of unresolved module EXPORTMATRIXTOR.

statement : RUN at line 9 column 1
10
11 submit RVar / R;
__
180
ERROR 180-322: Statement is not valid or it is used out of proper order.

2
What version of SAS do you have?DomPazz

2 Answers

3
votes

If the function and statement are not recognized, then you are running a release prior to SAS/IML 9.22, which was the third maintenance release of SAS 9.2. You can find your version of SAS by following follow these instructions. You might also be interested in the article that describes what versions of R are supported by various releases of SAS.

0
votes

try "call", not "run"

call ExportMatrixToR(q, "rq");