Reeza :
I start with SAS -- R . All parts have been checked and work.
Windows Environment variable R_HOME is correctly set.
proc options option= RLANG ; run ;
options set=R_HOME='C:\Users\Username\Anaconda3\R' ;
%put %sysget(R_HOME) ;
filename envcmd pipe 'set' lrecl=1024;
data WORK.Win10_Env_set;
infile envcmd dlm='=' missover;
length name $ 32 value $ 1024;
input name $ value $;
run;
/* If you get a matrix 14, 32, 50 as the result, then it's OK */
proc iml;
submit/R;
rx <- matrix( 1:3, nrow=1)
rm <- matrix( 1:9, nrow=3, byrow=TRUE)
rq <- rm %*% t(rx)
print(rq)
endsubmit;
quit;
proc iml;
/* Comparison of matrix operations in IML and R */
print "---------- SAS/IML Results -----------------";
x = 1:3; /* vector of sequence 1,2,3 */
m = {1 2 3, 4 5 6, 7 8 9}; /* 3 x 3 matrix */
q = m * t(x); /* matrix multiplication */
print q;
print "------------- R Results --------------------";
submit / R;
rx <- matrix( 1:3, nrow=1) # vector of sequence 1,2,3
rm <- matrix( 1:9, nrow=3, byrow=TRUE) # 3 x 3 matrix
rq <- rm %*% t(rx) # matrix multiplication
print(rq)
endsubmit;