Construct pairwise contrasts for all combinations of factor levels.
Arguments
- levels
A vector of factor levels to be compared.
- where
An optional formula specifying the subset over which the contrast is computed.
Examples
pairwise_contrasts(c("A", "B", "C"))
#> contrast: con_A_B
#> A: ~A
#> B: ~B
#>
#> contrast: con_A_C
#> A: ~A
#> B: ~C
#>
#> contrast: con_B_C
#> A: ~B
#> B: ~C
#>