Conduct R analysis within SAS

%macro RScript(Rscript);
data _null_;
file “&Rscript”;
infile cards;
input;
put _infile_;
%mend;

%macro CallR(Rscript, Rlog);
systask command “C:\Progra~1\R\R-2.8.0\bin\R.exe CMD BATCH –vanilla –quiet

How to do data cleaning

1) How to use SAS to merge base and look-up tables ? pro and con?1. array 2. sort-sort-merge;3. proc sql; 4. proc format; 5. hash objectCoding efficiency: 3>2>4>1>5I/O resource: 5>4>1>3>2flexibility: 3>>others2) What are the common methods for large…

PROC LOGISTIC: Concordant and discordant

Description of concordant and discordant in SAS PROC LOGISTIC Part of the default output from PROC LOGISTIC is a table that has entries including`percent concordant’ and `percent discordant’. To me, this implies the percent that would corre…

SAS v R: Getting help

I introduced this series the other day. Next up in the list is “getting help”. In both SAS and R, there are many sources of help. SAS has one that the usual R package does not have – technical support – although if you read the …

How to transpose data

“http://www.mitbbs.com/article_t/Statistics/31224273.html”Derive new var in data step –> reshape data in proc transpose –> use proc sql to generate reportdata one;input good P1 P2 P3 P4 P5 P6 P7 P8 P9 P10;if sum(of good-P10)=11 then yes=1;else yes=0…