tidy_group_by {broom.helpers} | R Documentation |
Group results by selected columns
Description
Indicates that results should be grouped. By default
(group_by = auto_group_by()
), results will be grouped according to the
y.level
column (for multinomial models) or the component
column
(multi-components models) if any.
Usage
tidy_group_by(
x,
group_by = auto_group_by(),
group_labels = NULL,
model = tidy_get_model(x)
)
auto_group_by()
Arguments
x |
( |
group_by |
( |
group_labels |
( |
model |
(a model object, e.g. |
Value
The x
tibble with, if relevant, an additional group_by
column.
See Also
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_attach_model()
,
tidy_disambiguate_terms()
,
tidy_identify_variables()
,
tidy_plus_plus()
,
tidy_remove_intercept()
,
tidy_select_variables()
Examples
mod <- multinom(Species ~ Petal.Width + Petal.Length, data = iris)
mod |> tidy_and_attach() |> tidy_group_by()
mod |>
tidy_and_attach() |>
tidy_group_by(group_labels = c(versicolor = "harlequin blueflag"))
mod |> tidy_and_attach() |> tidy_group_by(group_by = NULL)
mod |>
tidy_and_attach() |>
tidy_identify_variables() |>
tidy_group_by(group_by = variable)