StatRep – Displays SAS code and results of running the code
The StatRep package provides a system for creating reproducible research documents that combine LaTeX markup with SAS code and output. It allows authors to write a single LaTeX source document that simultaneously serves as the analysis script and the final report.
The package provides two environments (Datastep and Sascode) to display SAS code, and two tags (Listing and Graphic) to display SAS output. At compile time, StatRep automatically generates a SAS program that captures all requested output using the SAS Output Delivery System (ODS).
This updated version brings the following improvements over the original StatRep package:
- Improved path resolution with the SASmode option: WorkStation mode uses the current directory as root, while Server mode dynamically resolves the path from the _SASPROGRAMFILE SAS macro variable, enabling use in SAS Studio and SAS OnDemand for Academics.
- Full UTF-8 encoding support for SAS output files, with automatic detection from the inputenc package and fallback to UTF-8 by default.
- New SAS macros (STATREPResults, STATREPAllResults, STATREPMACROVAR) for automatic export of SAS numeric results and macro variables directly into LaTeX via \def commands, using predefined formatting for numbers, percentages, and dates
The package also includes the longfigure package for multi-page figures, a complete suite of SAS macros (statrep_macros.sas), and full documentation including a user's guide and a quickstart example.
This is an updated and maintained version of the original StatRep package developed by Tim Arnold and Warren F. Kuhfeld at SAS Institute Inc.
| Sources | /macros/latex/contrib/statrep |
| Documentation | |
| Bug tracker | https://github.com/MartialP-G/StatRep/issues |
| Announcements | https://github.com/MartialP-G/StatRep/releases |
| Repository | https://github.com/MartialP-G/StatRep |
| Version | 2.0 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2014–2015 SAS Institute Inc. 2026 Martial Phélippé-Guinvarc'h |
| Maintainer | Martial Phélippé-Guinvarc'h |
| Contained in | MiKTeX as statrep |
| Topics | Statistics |
Download the contents of this package in one zip archive (4.4M).
Announcements
Suggestions
Maybe you are interested in the following packages as well.
Community Comments