SAS and R: Data Management, Statistical Analysis, and Graphics

Ken Kleinman and Nicholas J. Horton

Download example code in R

A note about literate programming

SASweave, an implementation of literate programming that builds upon Sweave, was used to generate the output seen in the book (see also Russell Lenth's statweave). This code is run live to produce the displayed output (with one or two minor exceptions).

However, particularly for SAS, the code used to generate the output is cumbersome and repetitive in that code is often replicated exactly with the exception of small changes to the ODS statements. To make it easier for approximately the same results to be obtained more economically, we provide the simplified set of SAS code, which will generate more output with fewer lines of code.

Download simplified example code in SAS for:

Download actual code used to create SAS output for: