Is there a way in dplyr to compare groups with each other? Here a concrete example: I would like to apply a t-test to the following combinations: a vs b, a vs c and b vs c
set.seed(1)
tibble(value = c(rnorm(1000, 1, 1), rnorm(1000, 5, 1), rnorm(1000, 10,1)),
group=c(rep("a", 1000), rep("b", 1000), rep("c", 1000))) %>%
nest(value)
# A tibble: 3 x 2
group data
<chr> <list>
1 a <tibble [1,000 × 1]>
2 b <tibble [1,000 × 1]>
3 c <tibble [1,000 × 1]>
If dplyr provides no solution, i would also be happy for other approaches...maybe data.table?