broom: Convert Statistical Analysis Objects into Tidy Data Frames

Convert statistical analysis objects from R into tidy data frames, so that they can more easily be combined, reshaped and otherwise processed with tools like 'dplyr', 'tidyr' and 'ggplot2'. The package provides three S3 generics: tidy, which summarizes a model's statistical findings such as coefficients of a regression; augment, which adds columns to the original data such as predictions, residuals and cluster assignments; and glance, which provides a one-row summary of model-level statistics.

Install the latest version of this package by entering the following in R:
install.packages("broom")
AuthorDavid Robinson [aut, cre], Matthieu Gomez [ctb], Boris Demeshev [ctb], Dieter Menne [ctb], Benjamin Nutter [ctb], Luke Johnston [ctb], Ben Bolker [ctb], Francois Briatte [ctb], Jeffrey Arnold [ctb], Jonah Gabry [ctb], Luciano Selzer [ctb], Gavin Simpson [ctb], Jens Preussner [ctb], Jay Hesselberth [ctb], Hadley Wickham [ctb]
Date of publication2017-02-13 23:34:38
MaintainerDavid Robinson <admiral.david@gmail.com>
LicenseMIT + file LICENSE
Version0.4.2
http://github.com/tidyverse/broom

View on CRAN

Man pages

aareg_tidiers: Tidiers for aareg objects

acf_tidiers: Tidying method for the acf function

anova_tidiers: Tidying methods for anova and AOV objects

Arima_tidiers: Tidying methods for ARIMA modeling of time series

auc_tidiers: Tidiers for objects from the AUC package

augment: Augment data according to a tidied model

augment_columns: add fitted values, residuals, and other common outputs to an...

betareg_tidiers: Tidy betareg objects from the betareg package

biglm_tidiers: Tidiers for biglm and bigglm object

binDesign_tidiers: Tidy a binDesign object

binWidth_tidiers: Tidy a binWidth object

bootstrap: Set up bootstrap replicates of a dplyr operation

boot_tidiers: Tidying methods for bootstrap computations

brms_tidiers: Tidying methods for a brms model

broom: Convert Statistical Analysis Objects into Tidy Data Frames

btergm_tidiers: Tidying method for a bootstrapped temporal exponential random...

cch_tidiers: tidiers for case-cohort data

compact: Remove NULL items in a vector or list

confint.geeglm: Confidence interval for 'geeglm' objects

confint_tidy: Calculate confidence interval as a tidy data frame

coxph_tidiers: Tidiers for coxph object

cv.glmnet_tidiers: Tidiers for glmnet cross-validation objects

data.frame_tidiers: Tidiers for data.frame objects

ergm_tidiers: Tidying methods for an exponential random graph model

felm_tidiers: Tidying methods for models with multiple group fixed effects

finish_glance: Add logLik, AIC, BIC, and other common measurements to a...

fitdistr_tidiers: Tidying methods for fitdistr objects from the MASS package

fix_data_frame: Ensure an object is a data frame, with rownames moved into a...

gamlss_tidiers: Tidying methods for gamlss objects

gam_tidiers: Tidying methods for a generalized additive model (gam)

geeglm_tidiers: Tidying methods for generalized estimating equations models

glance: Construct a single row summary "glance" of a model, fit, or...

glmnet_tidiers: Tidiers for LASSO or elasticnet regularized fits

glm_tidiers: Tidying methods for a glm object

gmm_tidiers: Tidying methods for generalized method of moments "gmm"...

htest_tidiers: Tidying methods for an htest object

inflate: Expand a dataset to include all factorial combinations of one...

insert_NAs: insert a row of NAs into a data frame wherever another data...

kappa_tidiers: Tidy a kappa object from a Cohen's kappa calculation

kde_tidiers: Tidy a kernel density estimate object from the ks package

kmeans_tidiers: Tidying methods for kmeans objects

list_tidiers: Tidiers for return values from functions that aren't S3...

lme4_tidiers: Tidying methods for mixed effects models

lmodel2_tidiers: Tidiers for linear model II objects from the lmodel2 package

lm_tidiers: Tidying methods for a linear model

loess_tidiers: Augmenting methods for loess models

lsmeans_tidiers: Tidy least-squares means objects from the lsmeans packages

matrix_tidiers: Tidiers for matrix objects

mclust_tidiers: Tidying methods for Mclust objects

mcmc_tidiers: Tidying methods for MCMC (Stan, JAGS, etc.) fits

mle2_tidiers: Tidy mle2 maximum likelihood objects

multcomp_tidiers: tidying methods for objects produced by 'multcomp'

multinom_tidiers: Tidying methods for multinomial logistic regression models

nlme_tidiers: Tidying methods for mixed effects models

nls_tidiers: Tidying methods for a nonlinear model

optim_tidiers: Tidiers for lists returned from optim

orcutt_tidiers: Tidiers for Cochrane Orcutt object

plm_tidiers: Tidiers for panel regression linear models

poLCA_tidiers: Tidiers for poLCA objects

prcomp_tidiers: Tidying methods for principal components analysis via...

process_ergm: helper function to process a tidied ergm object

process_geeglm: helper function to process a tidied geeglm object

process_lm: helper function to process a tidied lm object

process_rq: Helper function for tidy.rq and tidy.rqs

pyears_tidiers: Tidy person-year summaries

rcorr_tidiers: Tidying methods for rcorr objects

ridgelm_tidiers: Tidying methods for ridgelm objects from the MASS package

rlm_tidiers: Tidying methods for an rlm (robust linear model) object

robust_tidiers: Tidiers for lmRob and glmRob objects

rowwise_df_tidiers: Tidying methods for rowwise_dfs from dplyr, for tidying each...

rq_tidiers: Tidying methods for quantile regression models

rstanarm_tidiers: Tidying methods for an rstanarm model

sexpfit_tidiers: Tidy an expected survival curve

smooth.spline_tidiers: tidying methods for smooth.spline objects

sparse_tidiers: Tidy a sparseMatrix object from the Matrix package

sp_tidiers: tidying methods for classes from the sp package.

summary_tidiers: Tidiers for summaryDefault objects

survfit_tidiers: tidy survival curve fits

survreg_tidiers: Tidiers for a parametric regression survival model

svd_tidiers: Tidying methods for singular value decomposition

tidy: Tidy the result of a test into a summary data.frame

tidy.coeftest: Tidying methods for coeftest objects

tidy.default: Default tidying method

tidy.density: tidy a density objet

tidy.dist: Tidy a distance matrix

tidy.ftable: tidy an ftable object

tidy.manova: tidy a MANOVA object

tidy.map: Tidy method for map objects.

tidy.NULL: tidy on a NULL input

tidy.pairwise.htest: tidy a pairwise hypothesis test

tidy.power.htest: tidy a power.htest

tidy.spec: tidy a spec objet

tidy.table: tidy a table object

tidy.ts: tidy a ts timeseries object

tidy.TukeyHSD: tidy a TukeyHSD object

unrowname: strip rownames from an object

vector_tidiers: Tidy atomic vectors

xyz_tidiers: Tidiers for x, y, z lists suitable for persp, image, etc.

zoo_tidiers: Tidying methods for a zoo object

Functions

aareg_tidiers Man page
acf_tidiers Man page
anova_tidiers Man page
Arima_tidiers Man page
auc_tidiers Man page
augment Man page
augment.betareg Man page
augment_columns Man page
augment.coxph Man page
augment.data.frame Man page
augment.felm Man page
augment.glmRob Man page
augment.kmeans Man page
augment.lm Man page
augment.lme Man page
augment.lmRob Man page
augment.loess Man page
augment.Mclust Man page
augment.merMod Man page
augment.nlrq Man page
augment.nls Man page
augment.plm Man page
augment.poLCA Man page
augment.prcomp Man page
augment_.rowwise_df Man page
augment.rowwise_df Man page
augment.rq Man page
augment.rqs Man page
augment.smooth.spline Man page
augment.survreg Man page
augment.tbl_df Man page
betareg_tidiers Man page
biglm_tidiers Man page
binDesign_tidiers Man page
binWidth_tidiers Man page
bootstrap Man page
boot_tidiers Man page
brms_tidiers Man page
broom Man page
broom-package Man page
btergm_tidiers Man page
cch_tidiers Man page
compact Man page
confint.geeglm Man page
confint_tidy Man page
coxph_tidiers Man page
cv.glmnet_tidiers Man page
data.frame_tidiers Man page
ergm_tidiers Man page
felm_tidiers Man page
finish_glance Man page
fitdistr_tidiers Man page
fix_data_frame Man page
gamlss_tidiers Man page
gam_tidiers Man page
geeglm_tidiers Man page
glance Man page
glance.aareg Man page
glance.Arima Man page
glance.betareg Man page
glance.biglm Man page
glance.binDesign Man page
glance.cch Man page
glance.coxph Man page
glance.cv.glmnet Man page
glance.data.frame Man page
glance.ergm Man page
glance.felm Man page
glance.fitdistr Man page
glance.gam Man page
glance.glm Man page
glance.glmnet Man page
glance.glmRob Man page
glance.gmm Man page
glance.htest Man page
glance.kmeans Man page
glance.list Man page
glance.lm Man page
glance.lme Man page
glance.lmodel2 Man page
glance.lmRob Man page
glance.matrix Man page
glance.Mclust Man page
glance.merMod Man page
glance.multinom Man page
glance.nlrq Man page
glance.nls Man page
glance_optim Man page
glance.orcutt Man page
glance.plm Man page
glance.poLCA Man page
glance.pyears Man page
glance.ridgelm Man page
glance.rlm Man page
glance_.rowwise_df Man page
glance.rowwise_df Man page
glance.rq Man page
glance.smooth.spline Man page
glance.stanreg Man page
glance.summaryDefault Man page
glance.summary.lm Man page
glance.survexp Man page
glance.survfit Man page
glance.survreg Man page
glance.tbl_df Man page
glmnet_tidiers Man page
glm_tidiers Man page
gmm_tidiers Man page
htest_tidiers Man page
inflate Man page
insert_NAs Man page
kappa_tidiers Man page
kde_tidiers Man page
kmeans_tidiers Man page
list_tidiers Man page
lme4_tidiers Man page
lmodel2_tidiers Man page
lm_tidiers Man page
loess_tidiers Man page
lsmeans_tidiers Man page
matrix_tidiers Man page
mclust_tidiers Man page
mcmc_tidiers Man page
mle2_tidiers Man page
multcomp_tidiers Man page
multinom_tidiers Man page
nlme_tidiers Man page
nls_tidiers Man page
optim_tidiers Man page
orcutt_tidiers Man page
plm_tidiers Man page
poLCA_tidiers Man page
prcomp_tidiers Man page
process_ergm Man page
process_geeglm Man page
process_lm Man page
process_rq Man page
pyears_tidiers Man page
rcorr_tidiers Man page
ridgelm_tidiers Man page
rlm_tidiers Man page
robust_tidiers Man page
rowwise_df_tidiers Man page
rq_tidiers Man page
rstanarm_tidiers Man page
sexpfit_tidiers Man page
smooth.spline_tidiers Man page
sparse_tidiers Man page
sp_tidiers Man page
summary_tidiers Man page
survfit_tidiers Man page
survreg_tidiers Man page
svd_tidiers Man page
tidy Man page
tidy.aareg Man page
tidy.acf Man page
tidy.anova Man page
tidy.aov Man page
tidy.aovlist Man page
tidy.Arima Man page
tidy.betareg Man page
tidy.biglm Man page
tidy.binDesign Man page
tidy.binWidth Man page
tidy.boot Man page
tidy.brmsfit Man page
tidy.btergm Man page
tidy.cch Man page
tidy.character Man page
tidy.cld Man page
tidy.coeftest Man page
tidy.confint.glht Man page
tidy.coxph Man page
tidy.cv.glmnet Man page
tidy.data.frame Man page
tidy.default Man page
tidy.density Man page
tidy.dgCMatrix Man page
tidy.dgTMatrix Man page
tidy.dist Man page
tidy.ergm Man page
tidy.felm Man page
tidy.fitdistr Man page
tidy.ftable Man page
tidy.gam Man page
tidy.gamlss Man page
tidy.geeglm Man page
tidy.glht Man page
tidy.glmnet Man page
tidy.glmRob Man page
tidy.gmm Man page
tidy.htest Man page
tidy.kappa Man page
tidy.kde Man page
tidy.kmeans Man page
tidy.Line Man page
tidy.Lines Man page
tidy.list Man page
tidy.lm Man page
tidy.lme Man page
tidy.lmodel2 Man page
tidy.lmRob Man page
tidy.logical Man page
tidy.lsmobj Man page
tidy.manova Man page
tidy.map Man page
tidy.matrix Man page
tidy.Mclust Man page
tidyMCMC Man page
tidy.merMod Man page
tidy.mle2 Man page
tidy.multinom Man page
tidy.nlrq Man page
tidy.nls Man page
tidy.NULL Man page
tidy.numeric Man page
tidy_optim Man page
tidy.orcutt Man page
tidy.pairwise.htest Man page
tidy.plm Man page
tidy.poLCA Man page
tidy.Polygon Man page
tidy.Polygons Man page
tidy.power.htest Man page
tidy.prcomp Man page
tidy.pyears Man page
tidy.rcorr Man page
tidy.ref.grid Man page
tidy.ridgelm Man page
tidy.rjags Man page
tidy.roc Man page
tidy_.rowwise_df Man page
tidy.rowwise_df Man page
tidy.rq Man page
tidy.rqs Man page
tidy.sparseMatrix Man page
tidy.SpatialLinesDataFrame Man page
tidy.SpatialPolygons Man page
tidy.SpatialPolygonsDataFrame Man page
tidy.spec Man page
tidy.stanfit Man page
tidy.stanreg Man page
tidy.summaryDefault Man page
tidy.summary.glht Man page
tidy.summary.lm Man page
tidy.survexp Man page
tidy.survfit Man page
tidy.survreg Man page
tidy_svd Man page
tidy.table Man page
tidy.tbl_df Man page
tidy.ts Man page
tidy.TukeyHSD Man page
tidy_xyz Man page
tidy.zoo Man page
unrowname Man page
xyz_tidiers Man page
zoo_tidiers Man page

Files

inst
inst/extdata
inst/extdata/8schools.stan
inst/extdata/rstan_example.rda
inst/doc
inst/doc/broom.html
inst/doc/kmeans.R
inst/doc/broom_and_dplyr.html
inst/doc/broom.Rmd
inst/doc/kmeans.Rmd
inst/doc/broom_and_dplyr.Rmd
inst/doc/bootstrapping.R inst/doc/broom.R inst/doc/broom_and_dplyr.R
inst/doc/kmeans.html
inst/doc/bootstrapping.html
inst/doc/bootstrapping.Rmd
tests
tests/testthat
tests/testthat/test-lme4.R tests/testthat/test-tidy.R tests/testthat/test-lm.R tests/testthat/test-gam.R tests/testthat/test-rstanarm.R tests/testthat/test-bootstrap.R tests/testthat/test-nlme.R tests/testthat/test-rowwise.R tests/testthat/test-dplyr.R tests/testthat/helper-checkers.R tests/testthat/test-augment.R tests/test-all.R
NAMESPACE
R
R/stats_tidiers.R R/mle2_tidiers.R R/sparse_tidiers.R R/ergm_tidiers.R R/felm_tidiers.R R/loess_tidiers.R R/fitdistr_tidiers.R R/svd_tidiers.R R/arima_tidiers.R R/bingroup_tidiers.R R/lsmeans_tidiers.R R/lme4_tidiers.R R/lm_tidiers.R R/list_tidiers.R R/map_tidiers.R R/lmtest_tidiers.R R/orcutt_tidiers.R R/plm_tidiers.R R/anova_tidiers.R R/glance.R R/mcmc_tidiers.R R/summary_tidiers.R R/vector_tidiers.R R/zoo_tidiers.R R/glm_tidiers.R R/geeglm_tidiers.R R/globals.R R/augment.R R/utilities.R R/tidy.R R/lmodel2_tidiers.R R/gam_tidiers.R R/nlme_tidiers.R R/polca_tidiers.R R/optim_tidiers.R R/rowwise_df_tidiers.R R/rstanarm_tidiers.R R/brms_tidiers.R R/data.frame_tidiers.R R/htest_tidiers.R R/broom.R R/multcomp_tidiers.R R/rq_tidiers.R R/biglm_tidiers.R R/kde_tidiers.R R/boot_tidiers.R R/ridgelm_tidiers.R R/survival_tidiers.R R/nls_tidiers.R R/kmeans_tidiers.R R/betareg_tidiers.R R/gmm_tidiers.R R/rcorr_tidiers.R R/gamlss_tidiers.R R/matrix_tidiers.R R/prcomp_tidiers.R R/btergm_tidiers.R R/smooth.spline_tidiers.R R/auc_tidiers.R R/xyz_tidiers.R R/mclust_tidiers.R R/psych_tidiers.R R/glmnet_tidiers.R R/robust_tidiers.R R/extras.R R/rlm_tidiers.R R/sp_tidiers.R R/multinom_tidiers.R
vignettes
vignettes/broom.Rmd
vignettes/kmeans.Rmd
vignettes/broom_and_dplyr.Rmd
vignettes/bootstrapping.Rmd
README.md
MD5
build
build/vignette.rds
DESCRIPTION
man
man/rstanarm_tidiers.Rd man/htest_tidiers.Rd man/unrowname.Rd man/svd_tidiers.Rd man/cv.glmnet_tidiers.Rd man/tidy.NULL.Rd man/geeglm_tidiers.Rd man/pyears_tidiers.Rd man/list_tidiers.Rd man/rlm_tidiers.Rd man/auc_tidiers.Rd man/bootstrap.Rd man/btergm_tidiers.Rd man/tidy.Rd man/fitdistr_tidiers.Rd man/binWidth_tidiers.Rd man/tidy.pairwise.htest.Rd man/aareg_tidiers.Rd man/nls_tidiers.Rd man/prcomp_tidiers.Rd man/lme4_tidiers.Rd man/fix_data_frame.Rd man/confint.geeglm.Rd man/tidy.TukeyHSD.Rd man/betareg_tidiers.Rd man/process_lm.Rd man/tidy.density.Rd man/glm_tidiers.Rd man/multcomp_tidiers.Rd man/optim_tidiers.Rd man/orcutt_tidiers.Rd man/tidy.spec.Rd man/compact.Rd man/rq_tidiers.Rd man/acf_tidiers.Rd man/boot_tidiers.Rd man/finish_glance.Rd man/poLCA_tidiers.Rd man/glmnet_tidiers.Rd man/kde_tidiers.Rd man/vector_tidiers.Rd man/ridgelm_tidiers.Rd man/brms_tidiers.Rd man/data.frame_tidiers.Rd man/binDesign_tidiers.Rd man/summary_tidiers.Rd man/tidy.map.Rd man/process_rq.Rd man/sexpfit_tidiers.Rd man/plm_tidiers.Rd man/lmodel2_tidiers.Rd man/rowwise_df_tidiers.Rd man/kappa_tidiers.Rd man/ergm_tidiers.Rd man/tidy.dist.Rd man/tidy.manova.Rd man/confint_tidy.Rd man/tidy.coeftest.Rd man/felm_tidiers.Rd man/sparse_tidiers.Rd man/smooth.spline_tidiers.Rd man/anova_tidiers.Rd man/inflate.Rd man/glance.Rd man/gam_tidiers.Rd man/tidy.table.Rd man/nlme_tidiers.Rd man/zoo_tidiers.Rd man/cch_tidiers.Rd man/mcmc_tidiers.Rd man/lsmeans_tidiers.Rd man/augment.Rd man/sp_tidiers.Rd man/lm_tidiers.Rd man/biglm_tidiers.Rd man/loess_tidiers.Rd man/mclust_tidiers.Rd man/tidy.ts.Rd man/survreg_tidiers.Rd man/matrix_tidiers.Rd man/broom.Rd man/robust_tidiers.Rd man/process_geeglm.Rd man/xyz_tidiers.Rd man/rcorr_tidiers.Rd man/multinom_tidiers.Rd man/coxph_tidiers.Rd man/augment_columns.Rd man/process_ergm.Rd man/kmeans_tidiers.Rd man/tidy.power.htest.Rd man/insert_NAs.Rd man/Arima_tidiers.Rd man/gmm_tidiers.Rd man/mle2_tidiers.Rd man/tidy.default.Rd man/gamlss_tidiers.Rd man/tidy.ftable.Rd man/survfit_tidiers.Rd
LICENSE

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.