I am not sure that my SAS code attached, so here it is just in case: %let dir=D:\Documents and Settings\dbateman\Desktop\SAS to R to SAS; data _null_; file "&dir.\program.R" lrecl=1024; put 'fv03lesions=read.csv("fv03_lesiondata.csv",header=T)'; put 'brpercent=fv03lesions[,11]'; put 'color=ifelse(fv-2lesions[,13]=="Positive",4,2)'; put "png(file='D:/Documents and Settings/dbateman/Desktop/SAS to R to SAS/program.jpg')"; put 'barplot(height=brpercent,width=.5,space=0,col=color,ylim=(-100,125),ylab="Percent Change in Tumor Size")'; put 'abline(h=0)'; put 'legend("topleft",lty=1,lwd=5,cex=.8,c("Positive","Negative"),col=c(4,2)'; put 'dev.off()'; put 'q()'; run; OPTIONS NOXWAIT XSYNC; X """D:\Program Files\R\R-2.11.1\bin\Rgui.exe"" --no-save --quiet <""&dir.\program.R""> ""&dir.\program.log"""; data_null_; infile "&dir.\program.log"; file log; input; put '**R: ' _infile_; run; ods escapechar='^'; ods rtf file="&dir.\report.rtf" style=minimal gtitle gfootnote; data _null_; file print; put "^S={preimage="&dir.\program.jpg"}"; run; ods _ALL_ close;
... View more