View source: R/grouping_utils.R
| compute_group_value_map | R Documentation |
Real-world grouping columns are often messy: "female"/"Female"/
"FEMALE" in the same column, meant to be one group, not three. Builds a
raw-value -> canonical-label mapping (one row per distinct raw value)
that the Import tab's "Merge / relabel values" table starts from and the
user can further edit by hand.
compute_group_value_map(raw_values, merge_case = TRUE)
raw_values |
The full grouping column, with repeats – frequency matters, since the most common casing/spacing variant becomes each cluster's canonical label (ties broken by whichever appears first). |
merge_case |
Logical; if |
A tibble with columns raw (every distinct input value) and
label (its canonical label).
compute_group_value_map(c("female", "Female", "male"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.