Formed by unique(vetor)

lower_triangle_factors(a, VarNames = c("Var1", "Var2"))

Arguments

a

vector

VarNames

character vector of length 2

Value

data.frame with two columns named according to VarNames

Details

Useful for creating heatmaps using only lower diagonal.

Examples

lower_triangle_factors(rep(1:3, 10))
#> Var1 Var2 #> 1 2 1 #> 2 3 1 #> 3 3 2