Convert Statistical Objects into Tidy Tibbles
Overview
Summarizes key information about statistical objects in tidy tibbles. This makes it easy to report results, create plots and consistently work with large numbers of models at once. Broom provides three verbs that each provide different types of information about a model. tidy() summarizes information about model components such as coefficients of a regression. glance() reports information about an entire model, such as goodness of fit measures like AIC and BIC. augment() adds information about individual observations to a dataset, such as fitted values or influence measures.
- Resolved an R CMD check WARNING on r-devel about namespace references in
R/sysdata.rdaby moving thejoineRMLtest fixture totests/testthat/fixtures/.
From NEWS.md in the release
Install
Health
ERRORexamplesr-devel-linux-x86_64-debian-gcc
Running examples in ‘broom-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: glance.survfit
> ### Title: Glance at a(n) survfit object
> ### Aliases: glance.survfit
>
> ### ** Examples
>
> ## Don't show:
> if (rlang::is_installed(c("survival", "ggplot2"))) withAutoprint({ # examplesIf
+ ## End(Don't show)
+
+ # load libraries for models and data
+ library(survival)
+
+ # fit model
+ cfit <- coxph(Surv(time, status) ~ age + sex, lung)
+ sfit <- survfit(cfit)
+
+ # summarize model fit with tidiers + visualization
+ tidy(sfit)
+ glance(sfit)
+
+ library(ggplot2)
+
+ ggplot(tidy(sfit), aes(time, estimate)) +
+ geom_line() +
+ geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25)
+
+ # multi-state
+ fitCI <- survfit(Surv(stop, status * as.numeric(event), type = "mstate") ~ 1,
+ data = mgus1, subset = (start == 0)
+ )
+
+ td_multi <- tidy(fitCI)
+
+ td_multi
+
+ ggplot(td_multi, aes(time, estimate, group = state)) +
+ geom_line(aes(color = state)) +
+ geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .25)
+ ## Don't show:
+ }) # examplesIf
> library(survival)
> cfit <- coxph(Surv(time, status) ~ age + sex, lung)
> sfit <- survfit(cfit)
Error in a$specials[[i]] : subscript out of bounds
Calls: withAutoprint ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution haltedERRORtestsr-devel-linux-x86_64-debian-gcc
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [14s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(broom)
>
> test_check("broom")
Attaching package: 'modeldata'
The following object is masked from 'package:datasets':
penguins
Multiple parameters; naming those columns ndf and ddf.
Saving _problems/test-survival-coxph-84.R
Saving _problems/test-survival-coxph-84.R
[ FAIL 2 | WARN 1 | SKIP 99 | PASS 934 ]
══ Skipped tests (99) ══════════════════════════════════════════════════════════
• On CRAN (99): 'test-aer.R:1:1', 'test-a
...[truncated]...
)) == head(results(newdata))
Backtrace:
▆
1. └─modeltests::check_augment_function(...) at test-survival-coxph.R:79:3
2. └─modeltests:::check_augment_data_specification(...)
3. └─testthat::expect_equal(...)
── Error ('test-survival-coxph.R:79:3'): augment.coxph ─────────────────────────
Error in `data.frame(..., check.names = FALSE)`: arguments imply differing number of rows: 229, 228
Backtrace:
▆
1. └─modeltests::check_augment_function(...) at test-survival-coxph.R:79:3
2. └─modeltests:::check_augment_data_specification(...)
3. └─broom (local) aug(model, data = dl$tibble, newdata = new_dl$tibble)
4. └─broom::augment_columns(...)
5. ├─tibble::as_tibble(cbind(original, ret))
6. └─base::cbind(original, ret)
7. └─base::cbind(deparse.level, ...)
8. └─base::data.frame(..., check.names = FALSE)
[ FAIL 2 | WARN 1 | SKIP 99 | PASS 934 ]
Error:
! Test failures.
Execution haltedERRORwhether package can be installedr-devel-linux-x86_64-fedora-clang
Installation failed. See ‘/data/localhost/ripley/R/packages/tests-clang/broom.Rcheck/00install.out’ for details.
- ERROR11 OK, 2 ERROR2026-10-24
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
Show 3 earlier changesHide 3 earlier changes
- OK13 OK2026-05-16
- WARNING13 OK, 1 WARNING2026-04-23
- OK14 OK2026-03-10
Documentation
- Help pages
- 235 (2 internal)includes a package overview page
- Examples that run
- 98%207 run in a plain check (185 of them under a condition) · 4 never run
- Exported functions with examples
- 14%
- Documented parameters
- 100%
- Return-value docs
- 57%
- Help pages citing references
- 1%
Downloads
Repository
- PRs merged (all time)
- 79%
- Median days to close, 50 most recently updated closed issues
- 2
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
15 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/tidymodels/broom on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-05-14 · The repository has a site deploy workflow
pkgdown site last built 2026-05-14
Show all practicesHide 3 practices
Dependencies
Installing broom adds 21 packages (13 with compiled code, 18 MB of source tarballs). Heaviest: stringi 11 MB, vctrs 1.0 MB, dplyr 902 KB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 173 more dependents and 158 packages that suggest it on CRAN ↗
Code & Tests
People & History
Show 114 more contributorsHide 114 contributors
Previously maintained by Simon Couch (0.7.7 to 1.0.10) and Alex Hayes (0.5.1 to 0.7.6).
Show 3 peopleHide 3 people
Pick two releases to compare their code metrics.
- 1.0.13Latest
- RR 4.6.0 released · 2026-04-24
- 1.0.122026-01-27 · diff ↗
- 1.0.112025-12-04 · diff ↗
- 1.0.102025-09-13 · diff ↗
- 1.0.92025-07-28 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.0.82025-03-28 · diff ↗
- 1.0.72024-09-26 · diff ↗
- 1.0.62024-05-17 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.0.52023-06-10 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.0.42023-03-11 · diff ↗
- 1.0.32023-01-25 · diff ↗
- 1.0.22022-12-15 · diff ↗
Show 42 earlier eventsHide 42 earlier events
- 1.0.12022-08-29 · diff ↗
- 1.0.02022-07-01 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.8.02022-04-13 · diff ↗
- 0.7.122022-01-29 · diff ↗
- 0.7.112022-01-03 · diff ↗
- 0.7.102021-10-31 · diff ↗
- 0.7.92021-07-27 · diff ↗
- 0.7.82021-06-24 · diff ↗
- 0.7.72021-06-13 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.7.62021-04-05 · diff ↗
- 0.7.52021-02-19 · diff ↗
- 0.7.42021-01-29 · diff ↗
- 0.7.32020-12-16 · diff ↗
- 0.7.22020-10-20 · diff ↗
- 0.7.12020-10-02 · diff ↗
- 0.7.0
- RR 4.0.0 released · 2020-04-24
- 0.5.62020-04-20 · diff ↗
- 0.5.52020-02-29 · diff ↗
- 0.5.42020-01-27 · diff ↗
- 0.5.32019-12-14 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.5.22019-04-07 · diff ↗
- 0.5.12018-12-05 · diff ↗
- 0.5.0
- 0.4.52018-07-03 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.4.42018-03-29 · diff ↗
- 0.4.32017-11-20 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.4.22017-02-13 · diff ↗
- 0.4.12016-06-24 · diff ↗
- RR 3.3.0 released · 2016-05-03
- 0.4.0
- 0.3.72015-05-06 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 0.3.62015-02-18 · diff ↗
- 0.3.52015-01-05 · diff ↗
- 0.3.42014-11-23
- RR 3.1.0 released · 2014-04-10
Package metadata
- First published
- 2014-11-23
- Total releases
- 45 / 12 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1
- Download size
- 456 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("broom")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.