Tuesday, January 19, 2016

SAS: Write to Word (rtf)

It's easy to write SAS output directly to Word (more precisely, to .rtf format).

    (1)  use the ods rtf file statement at the beginning to specify path, and
    (2)  use the ods rtf close statement at the end...


libname perm "F:\sasdata" access=readonly;

ods rtf file = 'F:\inclass\ojuice.rtf';

proc print data=perm.ojuice;
title 'Listing of Perm.Ojuice';
run;

goptions reset=all border hsize=5in vsize=4in;
title 'Scatter-plot of Ojuice';
proc gplot data=perm.ojuice;
plot sweetindex * pectin;
run;

title 'Regression of Ojuice';
proc reg data=perm.ojuice plots=none;
model Sweetindex = Pectin;
run;

ods rtf close;




Tuesday, January 5, 2016

HTML: xbar, yhat, etc.



Some cool HTML codes: I use these for embedding statistical symbols in R Markdown.


x-bar   x̄  x̄

y-hat   ŷ  ŷ