Skip to contents

Make unique pairs of level names for correlations

Usage

unique_pairs(v)

Arguments

v

a vector of level names or a number of levels

Value

a vector of all unique pairs

Examples

unique_pairs(c("O", "C", "E", "A", "N"))
#>  [1] "O-C" "O-E" "O-A" "O-N" "C-E" "C-A" "C-N" "E-A" "E-N" "A-N"
unique_pairs(3)
#> [1] "A-B" "A-C" "B-C"