tidy_glance: Turn an object into a tidy tibble with glance information

View source: R/tidy_glance.R

tidy_glanceR Documentation

Turn an object into a tidy tibble with glance information

Description

Apply both generics::tidy() and generics::glance() to an object and return a single tibble with both sets of information.

Usage

tidy_glance(x, ..., tidy_args = list(), glance_args = list())

Arguments

x

An object to be converted into a tidy tibble.

...

Additional arguments passed to generics::tidy() and generics::glance().

Arguments are passed to both methods, but should be ignored by the inapplicable method. For example, if called on an lm object, conf.int will affect generics::tidy() but not generics::glance().

tidy_args

A list of additional arguments passed only to generics::tidy().

glance_args

A list of additional arguments passed only to generics::glance().

Value

A tibble with columns and rows from generics::tidy() and columns of repeated rows from generics::glance().

Column names that appear in both the tidy data and glance data will be disambiguated by appending "model." to the glance column names.

Examples

mod <- lm(mpg ~ wt + qsec, data = mtcars)
tidy_glance(mod)
tidy_glance(mod, conf.int = TRUE)
tidy_glance(mod, tidy_args = list(conf.int = TRUE))

crossmap documentation built on Jan. 13, 2023, 1:13 a.m.