In reply to Rick Wicklin. Rick, Just for fun I did some experiments, and I think there is "a way" to push the code form file in SAS to R, of course it is very "non production" approach and a bit of "scratching your left ear with your right hand" but seems to work. The code is below, it uses the macro I wrote in reply to Leonid's blog post. Bart

filename f3 TEMP;

data _null_;
file f3;
infile cards4;
input;
put _infile_ ';'; /* a "semicolon" trick for R statements separation */
cards4;
Model <- lm(Weight ~ Height, data=Class, na.action="na.exclude")
print (Model$call)
print (Model)
;;;;
run;

proc iml;
codeText = resolve(' %minclude(f3, source=1) ');
print codeText;

call ExportDataSetToR("Sashelp.Class", "Class" );
submit codeText / R;
&codeText
endsubmit;
quit;