Skip to contents

Construct pairwise contrasts for all combinations of factor levels.

Usage

pairwise_contrasts(levels, where = NULL)

Arguments

levels

A vector of factor levels to be compared.

where

An optional formula specifying the subset over which the contrast is computed.

Value

A contrast_set object containing pairwise contrasts for all combinations of factor levels.

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 
#>