repfun: Create Tables, Listings and Figures using Functions Styled after SAS™ Macros

Mimic the style of traditional reporting macros for clinical trials. The purpose is to generate tables, listings and figures that support clinical research. This package is well suited for firms or individuals who wish to incorporate R without changing their ways of working as it follows a traditional clinical research workflow. Invoke functions (instead of macros) to summarize data and produce formatted reports. This package differs from others in that it includes tools (wrappers) for both analyzing and reporting data.

Version: 0.1.2
Depends: R (≥ 3.5)
Imports: arrow, data.table, glue, jsonlite, rlang, xportr, Hmisc, r2rtf, haven, dplyr, tidyr, magrittr, stringr
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), rprojroot, DT, kableExtra, admiral, tibble, lubridate, ggplot2 (≥ 3.5.0), devtools, spelling
Published: 2026-01-26
DOI: 10.32614/CRAN.package.repfun (may not be active yet)
Author: Chris Rook [aut, cre], Yongwei Wang [aut], GlaxoSmithKline Research & Development Limited [cph, fnd]
Maintainer: Chris Rook <cr883296 at gmail.com>
BugReports: https://github.com/GSK-Biostatistics/repfun/issues
License: Apache License (== 2.0)
URL: https://gsk-biostatistics.github.io/repfun/, https://github.com/GSK-Biostatistics/repfun
NeedsCompilation: no
Language: en-US
Materials: README, NEWS
CRAN checks: repfun results

Documentation:

Reference manual: repfun.html , repfun.pdf
Vignettes: AE-Tbls (source, R code)
Add-Big-N-to-DataFrame (source, R code)
Add-Decode-Variable (source, R code)
Add-Labels (source, R code)
Add-Page-Numbers-to-Dataframe (source, R code)
Add-Remove-Decode-Variables (source, R code)
Add-Supplemental-to-Domain (source, R code)
Align-Columns-for-TLF-Reporting (source, R code)
Convert-Format-Data-to-Codelist (source, R code)
Convert-RTF-to-PDF (source, R code)
Convert-Strings-to-Dates (source, R code)
Data-Compare (source, R code)
Dem-Tbls (source, R code)
Denormalize-A-DataFrame (source, R code)
Figures (source, R code)
Fill-Missings (source, R code)
Generate-Counts-and-Percents (source, R code)
Generate-Relative-Column-Widths-for-RTF-Reporting (source, R code)
Generate-Summary-Statistics (source, R code)
Get-Data-for-Population (source, R code)
Global-Reporting-Setup (source, R code)
Library-Setup (source, R code)
Load-Libraries (source, R code)
Proc-Contents (source, R code)
SAS-Type-Variable-Expansion (source, R code)
Set-Data (source, R code)
Stack-Variables (source, R code)

Downloads:

Package source: repfun_0.1.2.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): not available, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=repfun to link to this page.