R Observatory
Search
install.packages("rtables")
CRAN 30-day downloads, method
8,328+22.5% up on the 30 days before, the better direction
Test coverage, method
90%of lines run by tests

Reporting tables often have structure that goes beyond simple rectangular data. The 'rtables' package provides a framework for declaring complex multi-level tabulations and then applying them to data.

Full description

Reporting tables often have structure that goes beyond simple rectangular data. The 'rtables' package provides a framework for declaring complex multi-level tabulations and then applying them to data. This framework models both tabulation and the resulting tables as hierarchical, tree-like objects which support sibling sub-tables, arbitrary splitting or grouping of data in row and column dimensions, cells containing multiple values, and the concept of contextual summary computations. A convenient pipe-able interface is provided for declaring table layouts and the corresponding computations, and then applying them to data.

Maintainer
Joe Zhu
Latest release
1 Oct 2026
First release
22 Jan 2021

Compare with another package

More details
Releases
20
Needs compilation
No
Needs R
>= 4.1
Config/Needs/verdepcheck
pharmaverse/formatters, mllg/checkmate, rstudio/htmltools, gagolews/stringi, tidymodels/broom, cran/car, tidyverse/dplyr, davidgohel/flextable, yihui/knitr, r-lib/lifecycle, davidgohel/officer, Merck/r2rtf, rstudio/rmarkdown, therneau/survival, r-lib/testthat, tidyverse/tibble, tidyverse/tidyr, r-lib/withr, r-lib/xml2
Config/roxygen2/version
8.1.0
Date
2026-09-29
Language
en-US
Task views (1)
Collections (1) Method, Collections
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("rtables")
APA
Zhu, J., F. Hoffmann-La Roche AG, Becker, G., Garolini, D., Mordig, M., Munoz Tord, D., Sabanés Bové, D., Waddell, A., Yogasekaram, A., & de la Rua, E. (2026). rtables: Reporting Tables (Version 0.6.17) [Computer software]. https://doi.org/10.32614/CRAN.package.rtables
About

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA
Balamuta, J. J. (2026). R Observatory: Metrics for rtables version 0.6.17 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-28, which the citation names so these numbers can be found later.

All 13 check platforms pass.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    OK

    Version checked
    0.6.17
    Time taken
    870 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    0.6.17
    Time taken
    571 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    0.6.17
    Time taken
    642 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    0.6.17
    Time taken
    551 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    788 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    0.6.17
    Time taken
    226 s
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    977 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    1,075 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    829 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    833 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    0.6.17
    Time taken
    183 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    943 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    0.6.17
    Time taken
    761 s
  • 13 OK

Over time

No change since 25 Oct 2026

As a list (11)
ChangedWorst statusOKNotesWarningsErrors
25 Oct 2026OK13000
24 Oct 2026Error12001
4 Aug 2026OK13000
1 Aug 2026Note12100
9 Jun 2026OK13000
7 Jun 2026Error12001
13 May 2026OK13000
9 May 2026Warning12010
3 May 2026Error12001
25 Apr 2026OK12000
10 Mar 2026Note11300

Since March 2026

Check results on CRAN

Total downloads in the last 30 days
8,850+25.9% up on the 30 days before, the better directionIt is the sum of 4 channels: CRAN, r2u, autoCRAN and conda-forge.

CRAN rank

1,237 of 26,530

CRAN

8,328 downloads in the last 30 days

Rank
1,237 of 26,530
Change
+22.5% up on the 30 days before, the better direction

It is in the total. Take it out

r2u

123 downloads in the last 30 days

Rank
2,127 of 30,526
Change
+80.9% up on the 30 days before, the better direction

It is in the total. Take it out

autoCRAN

3 downloads in the last 30 days

Rank
17,776 of 29,212
Change
−85% down on the 30 days before, the worse direction

It is in the total. Take it out

conda-forge

396 downloads in the last 30 days

Rank
1,698 of 3,828
Change
+177% up on the 30 days before, the better direction

It is in the total. Take it out

Over time

Compare downloads

Needs
7
Dependent packages
13
Suggested by
4
Needs (7)
Installing it adds
11 packages, 15.5 MB of source
Of those, need compilation
9
Optional extras (13)
Dependent packages (13)
PackageTitleDownloads in 30 days
ternCreate Common TLGs Used in Clinical Trials2,618
teal.widgets'shiny' Widgets for 'teal' Applications1,151
teal.reporterReporting Tools for 'shiny' Modules1,017
rtables.officerExporting Tools for 'rtables'953
chevronStandard TLGs for Clinical Trials Reporting865
tern.mmrmTables and Graphs for Mixed Models for Repeated Measures (MMRM)814
teal.modules.generalGeneral Modules for 'teal' Applications810
teal.modules.clinical'teal' Modules for Standard Clinical Outputs800
tern.geeTables and Graphs for Generalized Estimating Equations (GEE) Model Fits754
autoslider.coreSlide Automation for Tables, Listings and Figures585
juncoCreate Common Tables and Listings Used in Clinical Trials522
autoslider.tradeSlide Automation for Trading Tables, Listings and Figures442
utealsShared Utilities to Extend the 'teal' Modules366
Functions
364
Public exports
209
Lines of R code
24,446
Median complexity
2.5
Functions (364)
Size and composition

Lines by kind (59,618)

KindLinesShare
R code24,44641%
Tests12,20020%
Documentation11,49619%
Guides11,47619%

Lines by language

LanguageLinesShare
R36,64662%
Rd11,49619%
Vignettes11,47619%

Languages are counted from file extensions.

Files
367
R functions
364
Object systems
S3: 3 methods, S4: 48 classes, S4: 194 generics, S4: 613 methods
Deprecated functions
2
Complexity
Median
2.5
Mean
4.17
Highest
34
Median lines per function
14
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
364
Calls
388
Unconnected
71
Groups
15
Growth (20 releases)
Total lines by release
24,332 on 22 Jan 202159,618 on 1 Oct 2026
Release changes

The tests ran and coverage was measured.

Lines run by tests
90.4%
Expressions run by tests
89.8%
Test cases
277
Exports named in tests
72.7%
Coverage by file (29)
Coverage run
Lines counted
9,363
Lines the tests ran
8,468
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat, tinytest
Test cases
277
Lines of tests
12,200
Test lines per line of code
0.5
Exports documented
100%
Arguments documented
98.3%
Return value documented
89.9%
Help pages with examples
68%
Examples run in checks
100%
Guides (38)
Other documentation
README
Yes, 519 words
Release notes file
Yes
Help pages
128
Lines of documentation
11,496

Funded by F. Hoffmann-La Roche AG

pharmaverse / rtables on github.com

Stars
262+0.77% up on 30 days ago, the better direction
Forks
54
Open issues
48
Last commit
1 Oct 2026
Activity
Commits
1,274
Open pull requests
0
Tagged releases
35
Latest tagged release
v0.6.17, 1 Oct 2026
In development
Default branch at 0.6.17.9000, ahead of CRAN 0.6.17 (checked 2026-10-25)
Issues closed in
36 days (median)
Pull requests closed in
4 days (median)
Pull requests merged
87%
Created
15 Nov 2017
Licence file reads as
–
Development practices (14)
KindFound
Continuous integrationGitHub Actions, GitLab CI
Governance and communityCode of conduct, Contributing guide, Issue templates, CODEOWNERS
Docs sourceREADME.Rmd, pkgdown
GitHub Pages site last deployed 2026-10-06
CoverageCoverage reporting
CRAN release processrevdep/
Automation and maintenancepre-commit
Lint, format, editorlintr, RStudio project

Method, repository practices

Across pharmaverse

Earlier repositories (1)
Claude Codeat least 1 crediting itClaude CodeFirst seen on or before 25 Jul 2026at least 1 crediting it
Claude Sonnet 4.6Claude Sonnet 4.626 Jul 20261 commit
GitHub Copilotat least 2 crediting itGitHub CopilotFirst seen on or before 25 Aug 2026at least 2 crediting it

Tools

ToolFirst seenCommits crediting it
Claude Code25 Jul 2026 or earlier1 at least
GitHub Copilot25 Aug 2026 or earlier2 at least

Models

ModelCommitsFirst commitLast commitCredit lines of
Claude Sonnet 4.6126 Jul 202626 Jul 2026Claude Code

Across pharmaverse

R releases
  • On CRAN
  • Release
VersionReleasedR
0.6.17 current1 Oct 20264.6.1
0.6.1622 Apr 20264.5.3
0.6.1514 Dec 20254.5.2
0.6.1418 Nov 20254.5.2
0.6.1319 Jun 20254.5.1
0.6.1211 Apr 20254.5.0
0.6.1110 Jan 20254.4.2
0.6.1020 Sep 20244.4.1
Earlier versions (12)
VersionReleasedREvents
0.6.927 Jun 20244.4.1
0.6.820 Jun 20244.4.1
0.6.715 Apr 20244.3.3
0.6.68 Dec 20234.3.2
0.6.330 Aug 20234.3.1Maintainer: Joe Zhu
0.6.125 May 20234.3.0
0.6.03 Mar 20234.2.2
0.5.121 May 20224.2.0
0.5.01 Apr 20224.1.3
0.4.06 Oct 20214.1.1
0.3.813 Jul 20214.1.0
0.3.622 Jan 20214.0.3
Release notes (0.6.17)

New Features

  • Added restrict_facets function factory for use with make_split_fun @gmbecker
  • Exported previously internal make_subset_expr for use when constructing custom splitting behavior
  • Exported previously internal splv_extra and splv_extra<- accessors for getting and setting child-specific extra arguments on SplitValue objects.
  • Exported previously internal value_expr accessor for retrieving the subsetting expression from a SplitValue or ValueWrapper object.
  • The .alt_df* family of afun arguments now receive subsets of df when alt_counts_df is not specified in the build_table call; previously resulted in an error.
  • Exported previously internal RefFootnote constructor for reference footnote objects.
  • Added accessor methods for RowsVerticalSection objects: row_cells, obj_format, obj_format<-, obj_na_str, obj_na_str<-, cell_values
  • Added c method for directly combining RowsVerticalSection objects
  • Added vignette: Guided Tour (Advanced) @gmbecker
  • Added vignette: Guided Tour (Advanced) - Custom Analysis And Summary Functions @gmbecker
  • Added vignette: Guided Tour (Advanced) - Analysis Functions - Split Context @gmbecker
  • Added vignette: Guided Tour (Advanced) - Analysis Functions - Combining Existing afuns @gmbecker
  • Added vignette: Guided Tour (Advanced) - Analysis Functions - (stub) Useful Building Blocks @gmbecker
  • Added vignette: Guided Tour (Advanced) - Custom Split Functions @gmbecker
  • Added vignette: Guided Tour (Advanced) - Custom Split Functions - (stub) make_split_fun @gmbecker
  • Added vignette: Guided Tour (Advanced) - Custom Split Functions - Behavioral Building Block @gmbecker
  • Added vignette: Guided Tour (Advanced) - Custom Split Functions - (stub) Worked Examples @gmbecker
  • Added vignette: Guided Tour (Advanced) - (stub) TableTree Objects @gmbecker
  • Added vignette: Guided Tour (Advanced) - (stub) TableTree Objects - (stub) Accessing Table Values @gmbecker
  • Added vignette: Guided Tour (Advanced) - (stub) TableTree Objects - (stub) Custom Scoring Functions For Sorting @gmbecker
  • Added vignette: Guided Tour (Advanced) - (stub) TableTree Objects - (stub) Custom Pruning Functions @gmbecker
  • Added at_sibling parameter to split_rows_by* and analyze functions, enabling placement of a new layout directive as a direct sibling of a previously declared split or analysis @gmbecker
  • Added get_anchor_list() function for inspecting the available sibling anchors in an existing layout @gmbecker
  • label_pos now accepts "default" as a value, which resolves to "visible" when at_sibling is non-NULL and "hidden" otherwise @gmbecker

Bug Fixes

  • indent_mod<- RowsVerticalSection method now correctly recycles length 1 values @gmbecker
  • Fixed uniqify_child_names emitting messages ending in a literal FALSE due to passing call. = FALSE to message(), which does not accept that argument @gmbecker
  • content functions now receive correct .ref_group value instead of a data.frame with zero rows, when requested. #1117 @gmbecker
  • Fix in the now exported RefFootnote in check for disallowed values in symbol argument