To facilitate the use of broom helpers with pipe, it is recommended to attach the original model as an attribute to the tibble of model terms generated by broom::tidy().
broom::tidy()
tidy_attach_model(x, model)tidy_and_attach(model, tidy_fun = broom::tidy, ...)tidy_get_model(x)tidy_detach_model(x)
tidy_and_attach(model, tidy_fun = broom::tidy, ...)
tidy_get_model(x)
tidy_detach_model(x)
a tibble of model terms
a model to be attached/tidied
option to specify a custom tidier function
other arguments passed to tidy_fun()
tidy_fun()
tidy_attach_model() attach the model to a tibble already generated while tidy_and_attach() will apply broom::tidy() and attach the model.
tidy_attach_model()
tidy_and_attach()
Use tidy_get_model() to get the model attached to the tibble and tidy_detach_model() to remove the attribute containing the model.
tidy_get_model()
tidy_detach_model()
Other tidy_helpers: tidy_add_contrasts(), tidy_add_estimate_to_reference_rows(), tidy_add_header_rows(), tidy_add_reference_rows(), tidy_add_term_labels(), tidy_add_variable_labels(), tidy_identify_variables(), tidy_plus_plus(), tidy_remove_intercept()
tidy_add_contrasts()
tidy_add_estimate_to_reference_rows()
tidy_add_header_rows()
tidy_add_reference_rows()
tidy_add_term_labels()
tidy_add_variable_labels()
tidy_identify_variables()
tidy_plus_plus()
tidy_remove_intercept()
# NOT RUN { mod <- lm(Sepal.Length ~ Sepal.Width + Species, data = iris) tt <- mod %>% tidy_and_attach(conf.int = TRUE) tt tidy_get_model(tt) # }
Run the code above in your browser using DataLab