Generates a data frame of all pairwise combinations of column
names from a data frame. Useful for programmatically specifying variable
pairs to pass to functions like compute_crosstable or
plot_crosstable.
Examples
comparison_combinations(generate_correlation_matrix(n = 10)[, 1:4])
#> X1 X2
#> 1 X1 X2
#> 2 X1 X3
#> 3 X1 X4
#> 7 X2 X1
#> 4 X2 X3
#> 5 X2 X4
#> 8 X3 X1
#> 10 X3 X2
#> 6 X3 X4
#> 9 X4 X1
#> 11 X4 X2
#> 12 X4 X3