Constructs a pairwise result for each level of a by variable.
Source:R/pair_methods.R
pairwise_by.Rd
Constructs a pairwise result for each level of a by variable.
Examples
pairwise_by(iris, by="Species", pair_cor)
#> # A tibble: 24 × 6
#> x y score group value pair_type
#> <chr> <chr> <chr> <fct> <dbl> <chr>
#> 1 Petal.Length Petal.Width pearson setosa 0.332 nn
#> 2 Petal.Length Petal.Width pearson versicolor 0.787 nn
#> 3 Petal.Length Petal.Width pearson virginica 0.322 nn
#> 4 Petal.Length Petal.Width pearson all 0.963 nn
#> 5 Petal.Length Sepal.Length pearson setosa 0.267 nn
#> 6 Petal.Length Sepal.Length pearson versicolor 0.754 nn
#> 7 Petal.Length Sepal.Length pearson virginica 0.864 nn
#> 8 Petal.Length Sepal.Length pearson all 0.872 nn
#> 9 Petal.Length Sepal.Width pearson setosa 0.178 nn
#> 10 Petal.Length Sepal.Width pearson versicolor 0.561 nn
#> # ℹ 14 more rows