broom v0.7.2


Monthly downloads



Convert Statistical Objects into Tidy Tibbles

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.



R build
status Coverage
status CRAN
status Downloads


broom summarizes key information about models in tidy tibble()s. broom provides three verbs to make it convenient to interact with model objects:

  • tidy() summarizes information about model components
  • glance() reports information about the entire model
  • augment() adds informations about observations to a dataset

For a detailed introduction, please see vignette("broom").

broom tidies 100+ models from popular modelling packages and almost all of the model objects in the stats package that comes with base R. vignette("available-methods") lists method availability.

If you aren’t familiar with tidy data structures and want to know how they can make your life easier, we highly recommend reading Hadley Wickham’s Tidy Data.


# we recommend installing the entire tidyverse 
# modeling set, which includes broom:

# alternatively, to install just broom:

# to get the development version from GitHub:

If you find a bug, please file a minimal reproducible example in the issues.


tidy() produces a tibble() where each row contains information about an important component of the model. For regression models, this often corresponds to regression coefficients. This is can be useful if you want to inspect a model or create custom visualizations.


fit <- lm(Volume ~ Girth + Height, trees)
#> # A tibble: 3 x 5
#>   term        estimate std.error statistic  p.value
#>   <chr>          <dbl>     <dbl>     <dbl>    <dbl>
#> 1 (Intercept)  -58.0       8.64      -6.71 2.75e- 7
#> 2 Girth          4.71      0.264     17.8  8.22e-17
#> 3 Height         0.339     0.130      2.61 1.45e- 2

glance() returns a tibble with exactly one row of goodness of fitness measures and related statistics. This is useful to check for model misspecification and to compare many models.

#> # A tibble: 1 x 12
#>   r.squared adj.r.squared sigma statistic  p.value    df logLik   AIC   BIC
#>       <dbl>         <dbl> <dbl>     <dbl>    <dbl> <dbl>  <dbl> <dbl> <dbl>
#> 1     0.948         0.944  3.88      255. 1.07e-18     2  -84.5  177.  183.
#> # … with 3 more variables: deviance <dbl>, df.residual <int>, nobs <int>

augment adds columns to a dataset, containing information such as fitted values, residuals or cluster assignments. All columns added to a dataset have . prefix to prevent existing columns from being overwritten.

augment(fit, data = trees)
#> # A tibble: 31 x 9
#>    Girth Height Volume .fitted .resid .std.resid   .hat .sigma   .cooksd
#>    <dbl>  <dbl>  <dbl>   <dbl>  <dbl>      <dbl>  <dbl>  <dbl>     <dbl>
#>  1   8.3     70   10.3    4.84  5.46      1.50   0.116    3.79 0.0978   
#>  2   8.6     65   10.3    4.55  5.75      1.60   0.147    3.77 0.148    
#>  3   8.8     63   10.2    4.82  5.38      1.53   0.177    3.78 0.167    
#>  4  10.5     72   16.4   15.9   0.526     0.140  0.0592   3.95 0.000409 
#>  5  10.7     81   18.8   19.9  -1.07     -0.294  0.121    3.95 0.00394  
#>  6  10.8     83   19.7   21.0  -1.32     -0.370  0.156    3.94 0.00840  
#>  7  11       66   15.6   16.2  -0.593    -0.162  0.115    3.95 0.00114  
#>  8  11       75   18.2   19.2  -1.05     -0.277  0.0515   3.95 0.00138  
#>  9  11.1     80   22.6   21.4   1.19      0.321  0.0920   3.95 0.00348  
#> 10  11.2     75   19.9   20.2  -0.288    -0.0759 0.0480   3.95 0.0000968
#> # … with 21 more rows


We welcome contributions of all types!

For questions and discussions about tidymodels packages, modeling, and machine learning, please post on RStudio Community. If you think you have encountered a bug, please submit an issue. Either way, learn how to create and share a reprex (a minimal, reproducible example), to clearly communicate about your code. Check out further details on contributing guidelines for tidymodels packages and how to get help.

If you have never directly contributed to an R package before, broom is an excellent place to start. Find an issue with the Beginner Friendly tag and comment that you’d like to take it on and we’ll help you get started.

Generally, too, we encourage typo corrections, bug reports, bug fixes and feature requests. Feedback on the clarity of the documentation is especially valuable!

If you are interested in adding tidier methods for new model objects, please read this article on the tidymodels website.

We have a Contributor Code of Conduct. By participating in broom you agree to abide by its terms.

Functions in broom

Name Description
augment.coxph Augment data with information from a(n) coxph object
augment.felm Augment data with information from a(n) felm object
augment.drc Augment data with information from a(n) drc object
augment.Mclust Augment data with information from a(n) Mclust object
augment.betamfx Augment data with information from a(n) betamfx object
augment.decomposed.ts Augment data with information from a(n) decomposed.ts object
augment.fixest Augment data with information from a(n) fixest object
augment.factanal Augment data with information from a(n) factanal object
augment.betareg Augment data with information from a(n) betareg object
augment.clm Augment data with information from a(n) clm object
augment.glm Augment data with information from a(n) glm object
augment.ivreg Augment data with information from a(n) ivreg object
augment.htest Augment data with information from a(n) htest object
augment.glmRob Augment data with information from a(n) glmRob object
augment.prcomp Augment data with information from a(n) prcomp object
augment.polr Augment data with information from a(n) polr object
augment.nls Augment data with information from a(n) nls object
augment.pam Augment data with information from a(n) pam object
augment.stl Augment data with information from a(n) stl object
augment.lmrob Augment data with information from a(n) lmrob object
augment.glmrob Augment data with information from a(n) glmrob object
augment.speedlm Augment data with information from a(n) speedlm object
augment.lmRob Augment data with information from a(n) lmRob object
augment.poLCA Augment data with information from a(n) poLCA object
augment.plm Augment data with information from a(n) plm object
augment.loess Tidy a(n) loess object
augment.lm Augment data with information from a(n) lm object
augment.kmeans Augment data with information from a(n) kmeans object
augment.survreg Augment data with information from a(n) survreg object
augment.sarlm Augment data with information from a(n) spatialreg object
augment_columns Add fitted values, residuals, and other common outputs to an augment call
confint_tidy (Deprecated) Calculate confidence interval as a tidy data frame
data.frame_tidiers Tidiers for data.frame objects
glance.clmm Glance at a(n) clmm object
glance.clm Glance at a(n) clm object
augment.mfx Augment data with information from a(n) mfx object
augment.mjoint Augment data with information from a(n) mjoint object
glance.betareg Glance at a(n) betareg object
augment.smooth.spline Tidy a(n) smooth.spline object
glance.biglm Glance at a(n) biglm object
glance.drc Glance at a(n) drc object Glance at a(n) cv.glmnet object
durbinWatsonTest_tidiers Tidy/glance a(n) durbinWatsonTest object
finish_glance (Deprecated) Add logLik, AIC, BIC, and other common measurements to a glance of a prediction
glance.coeftest Glance at a(n) coeftest object
glance.Mclust Glance at a(n) Mclust object
augment.mlogit Augment data with information from a(n) mlogit object
glance.aareg Glance at a(n) aareg object
glance.lm Glance at a(n) lm object
glance.lavaan Glance at a(n) lavaan object
glance.ergm Glance at a(n) ergm object
glance.lmRob Glance at a(n) lmRob object
glance.factanal Glance at a(n) factanal object
augment.nlrq Tidy a(n) nlrq object
glance.lmodel2 Glance at a(n) lmodel2 object
glance.nlrq Glance at a(n) nlrq object
augment.rlm Augment data with information from a(n) rlm object
augment.rma Augment data with information from a(n) rma object
glance.betamfx Glance at a(n) betamfx object
glance.felm Glance at a(n) felm object
glance.aov Glance at a(n) lm object
broom Convert Statistical Objects into Tidy Tibbles
bootstrap Set up bootstrap replicates of a dplyr operation
glance.kmeans Glance at a(n) kmeans object
glance.muhaz Glance at a(n) muhaz object
glance.ivreg Glance at a(n) ivreg object
glance.multinom Glance at a(n) multinom object
glance.svyolr Glance at a(n) svyolr object
glance.fitdistr Glance at a(n) fitdistr object
glance.polr Glance at a(n) polr object
augment.rqs Augment data with information from a(n) rqs object
augment.rq Augment data with information from a(n) rq object
fix_data_frame Ensure an object is a data frame, with rownames moved into a column
glance.gmm Glance at a(n) gmm object
glance.glmnet Glance at a(n) glmnet object
glance.Arima Glance at a(n) Arima object
glance.binDesign Glance at a(n) binDesign object
glance.survreg Glance at a(n) survreg object
glance.svyglm Glance at a(n) svyglm object
glance.pyears Glance at a(n) pyears object
glance.coxph Glance at a(n) coxph object
glance_optim Tidy a(n) optim object masquerading as list
glance.geeglm Glance at a(n) geeglm object
glance.garch Tidy a(n) garch object
tidy.btergm Tidy a(n) btergm object
tidy.TukeyHSD Tidy a(n) TukeyHSD object
tidy.Kendall Tidy a(n) Kendall object
tidy.aareg Tidy a(n) aareg object
tidy.Mclust Tidy a(n) Mclust object
tidy.cch Tidy a(n) cch object
glance.cch Glance at a(n) cch object
glance.fixest Glance at a(n) fixest object
glance.nls Glance at a(n) nls object
glance.mjoint Glance at a(n) mjoint object
tidy.ftable (Deprecated) Tidy ftable objects
tidy.density (Deprecated) Tidy density objects
tidy.dist (Deprecated) Tidy dist objects
glance.glmRob Glance at a(n) glmRob object
glance.glm Glance at a(n) glm object
glance.orcutt Glance at a(n) orcutt object
tidy.gam Tidy a(n) gam object
list_tidiers Tidying methods for lists / returned values that are not S3 objects
glance.margins Glance at a(n) margins object
glance.gam Glance at a(n) gam object
tidy.lm Tidy a(n) lm object
glance.pam Glance at a(n) pam object
tidy.lm.beta Tidy a(n) lm.beta object
tidy.aov Tidy a(n) aov object
tidy.clm Tidy a(n) clm object
tidy.aovlist Tidy a(n) aovlist object
tidy.rma Tidy a(n) rma object
tidy.cld Tidy a(n) cld object
glance.rq Glance at a(n) rq object
glance.mlogit Glance at a(n) mlogit object
glance.plm Glance at a(n) plm object
tidy.glm Tidy a(n) glm object
glance.poLCA Glance at a(n) poLCA object
glance.smooth.spline Tidy a(n) smooth.spine object
tidy.clmm Tidy a(n) clmm object
tidy.binDesign Tidy a(n) binDesign object
null_tidiers Tidiers for NULL inputs
glance.speedglm Glance at a(n) speedglm object
glance.sarlm Glance at a(n) spatialreg object
tidy.biglm Tidy a(n) biglm object
reexports Objects exported from other packages
summary_tidiers (Deprecated) Tidy summaryDefault objects
glance.rma Glance at a(n) rma object
tidy.Arima Tidy a(n) Arima object
tidy.felm Tidy a(n) felm object
tidy.factanal Tidy a(n) factanal object
tidy.geeglm Tidy a(n) geeglm object
tidy.coeftest Tidy a(n) coeftest object
tidy.gamlss Tidy a(n) gamlss object
tidy.garch Tidy a(n) garch object
tidy.coxph Tidy a(n) coxph object
tidy.glmnet Tidy a(n) glmnet object Tidy a(n) cv.glmnet object
tidy.glmRob Tidy a(n) glmRob object
tidy.kmeans Tidy a(n) kmeans object
tidy.lavaan Tidy a(n) lavaan object
tidy.lsmobj Tidy a(n) lsmobj object
tidy.power.htest Tidy a(n) power.htest object
tidy.mlm Tidy a(n) mlm object Tidy a(n) map object
tidy.mlogit Tidying methods for logit models
tidy.prcomp Tidy a(n) prcomp object
tidy.margins Tidy a(n) margins object
tidy.roc Tidy a(n) roc object
tidy.nlrq Tidy a(n) nlrq object
tidy.nls Tidy a(n) nls object
tidy.manova Tidy a(n) manova object
tidy.gmm Tidy a(n) gmm object
tidy.summary_emm Tidy a(n) summary_emm object
tidy.survdiff Tidy a(n) survdiff object
tidy.rq Tidy a(n) rq object
tidy.multinom Tidying methods for multinomial logistic regression models
tidy.mle2 Tidy a(n) mle2 object
tidy.muhaz Tidy a(n) muhaz object
tidy.mjoint Tidy a(n) mjoint object
glance.mfx Glance at a(n) mfx object
glance.ridgelm Glance at a(n) ridgelm object
glance.rlm Glance at a(n) rlm object
glance.lmrob Glance at a(n) lmrob object
tidy.glht Tidy a(n) glht object
tidy.htest Tidy/glance a(n) htest object
glance.survexp Glance at a(n) survexp object
tidy.lmRob Tidy a(n) lmRob object
tidy.lmodel2 Tidy a(n) lmodel2 object
tidy.ivreg Tidy a(n) ivreg object
tidy.zoo Tidy a(n) zoo object
tidy.rqs Tidy a(n) rqs object
tidy_irlba Tidy a(n) irlba object masquerading as list
tidy.sarlm Tidying methods for spatially autoregressive models
glance.survfit Glance at a(n) survfit object
tidy.betamfx Tidy a(n) betamfx object
glance.speedlm Glance at a(n) speedlm object
tidy.pairwise.htest Tidy a(n) pairwise.htest object
tidy.orcutt Tidy a(n) orcutt object
tidy.ref.grid Tidy a(n) ref.grid object
glance.survdiff Glance at a(n) survdiff object
tidy.rcorr Tidy a(n) rcorr object
tidy.survexp Tidy a(n) survexp object
tidy.survfit Tidy a(n) survfit object
tidy.pyears Tidy a(n) pyears object
tidy.drc Tidy a(n) drc object
tidy.confint.glht Tidy a(n) confint.glht object
tidy.betareg Tidy a(n) betareg object
tidy.confusionMatrix Tidy a(n) confusionMatrix object
tidy.emmGrid Tidy a(n) emmGrid object
sp_tidiers Tidy a(n) SpatialPolygonsDataFrame object
sparse_tidiers Tidy a sparseMatrix object from the Matrix package
tidy.regsubsets Tidy a(n) regsubsets object
tidy.kappa Tidy a(n) kappa object
tidy.kde Tidy a(n) kde object
tidy.svyglm Tidy a(n) svyglm object
tidy.spec Tidy a(n) spec object
tidy.survreg Tidy a(n) survreg object
tidy.speedglm Tidy a(n) speedglm object
tidy.epi.2by2 Tidy a(n) epi.2by2 object
tidy.boot Tidy a(n) boot object
tidy.acf Tidy a(n) acf object
tidy.binWidth Tidy a(n) binWidth object
tidy.anova Tidy a(n) anova object
tidy.mediate Tidy a(n) mediate object
tidy.mfx Tidy a(n) mfx object
tidy.fitdistr Tidy a(n) fitdistr object
tidy.ergm Tidy a(n) ergm object
tidy.fixest Tidy a(n) fixest object
tidy.pam Tidy a(n) pam object
tidy.systemfit Tidy a(n) systemfit object
tidy.rlm Tidy a(n) rlm object
tidy.summary.glht Tidy a(n) summary.glht object
tidy.ridgelm Tidy a(n) ridgelm object
tidy.svyolr Tidy a(n) svyolr object
tidy.speedlm Tidy a(n) speedlm object
tidy_optim Tidy a(n) optim object masquerading as list
tidy.poLCA Tidy a(n) poLCA object
tidy.plm Tidy a(n) plm object
tidy.polr Tidy a(n) polr object
tidy_svd Tidy a(n) svd object masquerading as list
tidy.lmrob Tidy a(n) lmrob object
tidy.ts Tidy a(n) ts object
tidy.glmrob Tidy a(n) glmrob object
tidy.table Tidy a(n) table object
tidy_xyz Tidy a(n) xyz object masquerading as list
tidy.numeric Tidy atomic vectors
No Results!

Vignettes of broom

No Results!

Last month downloads


Type Package
License MIT + file LICENSE
VignetteBuilder knitr
Encoding UTF-8
LazyData true
RoxygenNote 7.1.1
Language en-US
Collate 'aaa-documentation-helper.R' 'null-and-default-tidiers.R' 'aer-tidiers.R' 'auc-tidiers.R' 'base-tidiers.R' 'bbmle-tidiers.R' 'betareg-tidiers.R' 'biglm-tidiers.R' 'bingroup-tidiers.R' 'boot-tidiers.R' 'broom-package.R' 'broom.R' 'btergm-tidiers.R' 'car-tidiers.R' 'caret-tidiers.R' 'data-frame-tidiers.R' 'deprecated-0-7-0.R' 'deprecated-0-7-1.R' 'drc-tidiers.R' 'emmeans-tidiers.R' 'epiR-tidiers.R' 'ergm-tidiers.R' 'fixest-tidiers.R' 'gam-tidiers.R' 'gee.R' 'geepack-tidiers.R' 'glmnet-cv-glmnet-tidiers.R' 'glmnet-glmnet-tidiers.R' 'gmm-tidiers.R' 'hmisc-tidiers.R' 'joinerml-tidiers.R' 'kendall-tidiers.R' 'ks-tidiers.R' 'lavaan-tidiers.R' 'leaps.R' 'lfe-tidiers.R' 'list-irlba.R' 'list-optim-tidiers.R' 'list-svd-tidiers.R' 'list-tidiers.R' 'list-xyz-tidiers.R' 'lm-beta-tidiers.R' 'lmodel2-tidiers.R' 'lmtest-tidiers.R' 'maps-tidiers.R' 'margins-tidiers.R' 'mass-fitdistr-tidiers.R' 'mass-polr-tidiers.R' 'mass-ridgelm-tidiers.R' 'stats-lm-tidiers.R' 'mass-rlm-tidiers.R' 'matrix-tidiers.R' 'mclogit.R' 'mclust-tidiers.R' 'mediate-tidiers.R' 'mfx-tidiers.R' 'mgcv-tidiers.R' 'mlogit-tidiers.R' 'muhaz-tidiers.R' 'multcomp-tidiers.R' 'nnet-tidiers.R' 'nobs.R' 'orcutt-tidiers.R' 'ordinal-clm-tidiers.R' 'ordinal-clmm-tidiers.R' 'pam-tidiers.R' 'plm-tidiers.R' 'polca-tidiers.R' 'psych-tidiers.R' 'stats-nls-tidiers.R' 'quantreg-nlrq-tidiers.R' 'quantreg-rq-tidiers.R' 'quantreg-rqs-tidiers.R' 'rma-tidiers.R' 'robust-glmrob-tidiers.R' 'robust-lmrob-tidiers.R' 'robustbase-glmrob-tidiers.R' 'robustbase-lmrob-tidiers.R' 'scam-tidiers.R' 'sp-tidiers.R' 'spdep-tidiers.R' 'speedglm-speedglm-tidiers.R' 'speedglm-speedlm-tidiers.R' 'stats-anova-tidiers.R' 'stats-arima-tidiers.R' 'stats-decompose-tidiers.R' 'stats-factanal-tidiers.R' 'stats-glm-tidiers.R' 'stats-htest-tidiers.R' 'stats-kmeans-tidiers.R' 'stats-loess-tidiers.R' 'stats-mlm-tidiers.R' 'stats-prcomp-tidiers.R' 'stats-smooth.spline-tidiers.R' 'stats-time-series-tidiers.R' 'survey-tidiers.R' 'survival-aareg-tidiers.R' 'survival-cch-tidiers.R' 'survival-coxph-tidiers.R' 'survival-pyears-tidiers.R' 'survival-survdiff-tidiers.R' 'survival-survexp-tidiers.R' 'survival-survfit-tidiers.R' 'survival-survreg-tidiers.R' 'systemfit-tidiers.R' 'tseries-tidiers.R' 'utilities.R' 'zoo-tidiers.R' 'zzz.R'
NeedsCompilation no
Packaged 2020-10-18 23:50:24 UTC; simonpcouch
Repository CRAN
Date/Publication 2020-10-20 07:00:24 UTC
suggests AER , akima , AUC , bbmle , betareg , biglm , binGroup , boot , btergm , car , caret , cluster , coda , covr , drc , e1071 , emmeans , epiR , ergm (>= 3.10.4) , fixest (>= 0.5.0) , gam (>= 1.15) , gamlss , , gamlss.dist , gee , geepack , ggplot2 , glmnet , glmnetUtils , gmm , Hmisc , irlba , joineRML , Kendall , knitr , ks , Lahman , lavaan , leaps , lfe , lm.beta , lme4 , lmodel2 , lmtest (>= 0.9.38) , lsmeans , maps , maptools , margins , MASS , Matrix , mclogit , mclust , mediation , metafor , mfx , mgcv , mlogit , modeldata , modeltests , muhaz , multcomp , network , nnet , orcutt (>= 2.2) , ordinal , plm , poLCA , psych , quantreg , rgeos , rmarkdown , robust , robustbase , rsample , sandwich , sp , spatialreg , spdep , speedglm , spelling , survey , survival , systemfit , testthat (>= 2.1.0) , tseries , zoo
imports backports , dplyr (>= 1.0.0) , ellipsis , generics (>= 0.0.2) , glue , methods , purrr , rlang , stringr , tibble (>= 3.0.0) , tidyr (>= 1.0.0)
depends R (>= 3.1)
Contributors Roger Bivand, Matthieu Stigler, Benjamin Nutter, PaulChristian Buerkner, Luciano Selzer, David Robinson, Frederik Aust, Eduard Szcs, Greg Macfarlane, Matthieu Gomez, Francois Briatte, Sergio Oller Moreno, Matthew Lincoln, Michal Bojanowski, Hao Zhu, Simon Jackson, Vilmantas Gegzna, Boris Demeshev, Jonah Gabry, Lukasz Komsta, Joseph Larmarange, Hadley Wickham, Henrik Bengtsson, Jeffrey B. Arnold, Dieter Menne, Steven E. Pav, Sven Templer, David Hugh-Jones, Vincent Arel-Bundock, Ben Bolker, Gavin Simpson, Jim Hester, Luke Johnston, Jens Preussner, Jay Hesselberth, Bill Denney, Matthew Kay, Hong Ooi, Jennifer Bryan, Jasper Cooper, Max Kuhn, Brian A. Fannin, Jorge Cimentada, Derek Chiu, Bernie Gray, Jason Cory Brunson, Alessandro Gasparini, Aaron Jacobs, Luke Sonnet, Indrajeet Patil, Malcolm Barrett, Simon P. Couch, Patrick Kennedy, Frederick Novometsky, Wilson Freitas, Michelle Evans, Ben Whalley, Michael Kuehn, Erle Holgersen, Karl Dunkle Werner, Lily Medina, Erwan Le Pennec, Nic Crane, Kevin Zarca, Brenton M. Wiernik, Tyler Littlefield, Nick Williams, Andreas Bender, Bruna Wundervald, James Martherus, Grant McDermott, Shiro Kuriwaki, Andrew Bates, Karissa Whiting, Yves Rosseel, Ethan Christensen, Paul PJ, Ben Schneider, Jason Muhlenkamp, Matt Lehman, Hideaki Hayashi, Luis Tobalina, Annie Wang, Wei Yang Tham, Clara Wang, Abby Smith, E Auden Krauska, Alex Wang, Charles Gray, Jared Wilber, Angus Moore, Marius Barth, Joyce Cahoon, Lukas Wallrich, Chuliang Xiao, Hakon Malmedal, Clara Wang, Mara Averick, Johan Junkka, Benjamin Soltoff, Zoe Wilkinson Saldana, Shabbh E. Banks, Serina Robinson, Riinu Ots, Nina Jakobsen, Michael Weylandt, Lisa Lendway, Karl Hailperin, Josue Rodriguez, Chris Jarvis, Brian Mannakee, Drew Tyre, Shreyas Singh, Laurens Geffert, Hugo Tavares, R. Willem Vervoort

Include our badge in your README