Since R and SAS are here to stay in statistical analysis world, I'have been exploring what ways exists to make them work better with each other. Downloaded $PROC_R from URL- http://www.jstatsoft.org/v46/c02, which is a SAS macro that enable running R code in base SAS environment. Also followed the instruction from the supplements PDF file to create a modified SAS shortcut on desktop as I'm using SAS 9.4 in Windows 8 OS.
When I execute the example code I get 2 errors.
SAS Code:
data test;
do x=1 to 4;
array a[4] a1-a4;
do i=1 to 4;
a[i] = rannor(100);
end;
output;
end;
drop i x;
run;
%include "C:\Proc_R.sas";
%Proc_R (SAS2R = test, R2SAS =);
cards4;
R> testm <- as.matrix(test)
R> eigen(testm)
;;;;
%quit;
1st Error: (however the code execution does not halt here)
ERROR: Physical file does not exist, C:\Users\878572\AppData\Local\Temp\SAS Temporary
Files\_TD4972_01HW475399_\r_log_1737015649.txt.
2nd Error:
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric
operand is required. The condition was: &fgsw=1
ERROR: The macro QUIT will stop executing.
Appreciate any help.