View source: R/tidy_and_attach.R
tidy_attach_model | R Documentation |
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()
.
tidy_attach_model(x, model, .attributes = NULL)
tidy_and_attach(
model,
tidy_fun = tidy_with_broom_or_parameters,
conf.int = TRUE,
conf.level = 0.95,
exponentiate = FALSE,
model_matrix_attr = TRUE,
...
)
tidy_get_model(x)
tidy_detach_model(x)
x |
( |
model |
(a model object, e.g. |
.attributes |
( |
tidy_fun |
( |
conf.int |
( |
conf.level |
( |
exponentiate |
( |
model_matrix_attr |
( |
... |
Other arguments passed to |
tidy_attach_model()
attach the model to a tibble already generated while
tidy_and_attach()
will apply broom::tidy()
and attach the model.
Use tidy_get_model()
to get the model attached to the tibble and
tidy_detach_model()
to remove the attribute containing the model.
Other tidy_helpers:
tidy_add_coefficients_type()
,
tidy_add_contrasts()
,
tidy_add_estimate_to_reference_rows()
,
tidy_add_header_rows()
,
tidy_add_n()
,
tidy_add_pairwise_contrasts()
,
tidy_add_reference_rows()
,
tidy_add_term_labels()
,
tidy_add_variable_labels()
,
tidy_disambiguate_terms()
,
tidy_group_by()
,
tidy_identify_variables()
,
tidy_plus_plus()
,
tidy_remove_intercept()
,
tidy_select_variables()
mod <- lm(Sepal.Length ~ Sepal.Width + Species, data = iris)
tt <- mod |>
tidy_and_attach(conf.int = TRUE)
tt
tidy_get_model(tt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.