My RLANG System Option has already determined that I am able to call R from SAS System.
I have also set up R_HOME environment variable that points to the correct directory that contains LibR.so. This has been correctly configured on the config file that RLANG System Option value stated.
These are the codes that I have submitted on the studio (I tried both):
proc options option=RLANG value;
run;
options set=R_HOME='/opt/anaconda3/lib/R';
%put %sysget(R_HOME);
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;
quit;
While my result for SAS/IML successfully displayed on output, the moment I placed the R results code in, the program keeps being on running mode for long hours and it is on loop. Is there any way to resolve this issue since there is no error log found and the settings were done correctly?