# Perform pairwise comparisons and adjust p-values
ToothGrowth %>%
t_test(len ~ dose) %>%
adjust_pvalue()
# Grouped data: adjustment within vs across groups
# Per-group adjustment (within each supp level):
ToothGrowth %>%
group_by(supp) %>%
t_test(len ~ dose) # in-test holm, adjusted within each group
# One family across ALL comparisons (all groups together):
ToothGrowth %>%
group_by(supp) %>%
t_test(len ~ dose, p.adjust.method = "none") %>%
adjust_pvalue(method = "holm")
Run the code above in your browser using DataLab