# Tukey HSD post-hoc, then compact letter display
res <- ToothGrowth %>%
mutate(dose = factor(dose)) %>%
tukey_hsd(len ~ dose)
res %>% add_cld()
# Works on rank-based post-hocs too
ToothGrowth %>% dunn_test(len ~ dose) %>% add_cld()
# Grouped pairwise test -> one CLD per group
ToothGrowth %>%
mutate(dose = factor(dose)) %>%
group_by(supp) %>%
tukey_hsd(len ~ dose) %>%
add_cld()
Run the code above in your browser using DataLab