R: Pairwise t-test, specific order of comparisons df:
| P | KB | WPM |
|---+----+-----|
| 1 |  A |  32 |
| 1 |  B |  36 |
| 1 |  C |  33 |
| 2 |  A |  70 |
| 2 |  B |  62 |
| 2 |  C |  73 |


comp <- list(c("C", "A"), c("B", "C"))
df %>% pairwise_t_test(WPM ~ KB, paired = TRUE, alternative = "greater", comparisons = comp)

Is it possible to compare the groups in the specific order provided in comp?
With the code in the example, the pairwise_t_test function does not respect the internal order of the IVs and instead compares like this:
A > C
B > C

instead of
C > A
B > C

I'm very new to R and statistics, so maybe the T-Test in general requires a certain internal ordering to yield correct results or do I perhaps miss something else quite obvious, idk?
Additional info:
The t-test, is used after a rmANOVA or Friedman ANOVA, if the differences between groups are normally distributed (normality was evaluated by looking at qqplots if SW-Test yielded that the data is normal) to identify which groups differ.
 A: For now, I solved it like this:
# Can be passed via parameter
pairs <- list(c("C", "A"), c("B", "C"))
tmp <- data.frame()
is_first <- TRUE
for (p in pairs) {
  # Only use the 2 IVs of interest for this t-test
  ph <- exp %>% filter(iv == p[[1]] | iv == p[[2]]) %>% 
    pairwise_t_test(f, paired = TRUE, alternative = "greater", 
                    ref.group = p[[1]], p.adjust.method = "none")
  # Create Tibble with all of the individual t-tests
  if (is_first) {
    tmp <- ph
    is_first <- FALSE
  } else {
    tmp <- ph %>% add_row(tmp, .before=TRUE)
  }
}
ph <- tmp
# Adjust the p-values bc we did multiple tests
ph$p.adj <- p.adjust(ph$p, method = "holm")
ph$p.adj.signif <- NULL

There is probably a more sophisticated solution out there, but since I am very new to R, this is what I can provide for now.
Results look like this:
A tibble: 2 x 10
  .y.     group1 group2    n1   n2  statistic df        p p.adj 
  <chr>   <chr>  <chr>    <int> <int>   <dbl> <dbl> <dbl> <dbl>       
1 IV      C      A        24    24      0.555 23    0.292 0.292          
2 IV      B      C        24    24      2.99  23    0.003 0.006  

IMPORTANT: I did not adjust the last column p.adj.signif, since I can do that by hand. If anyone has an easy fix for that, let me know! For now, I just removed the column in the output (:
Info: I use this part in a bigger function that I use to conduct rmANOVA/Friedman, and that is the part for the post-hoc tests (If assumptions for the t-test are fulfilled).
