Pairwise T-test: Error in complete.cases(x, y) : not all arguments have the same length

Hello all,

I am trying to run a pairwise T-test:

Dataundershootwithoutmeansminusstopdistance %>% pairwise_t_test(Undershootextent ~ Condition, paired = TRUE, p.adjust.method = "bonferroni")

I am getting this result:

Error in complete.cases(x, y) : not all arguments have the same length

However, I don't see why this should be the case:

Here is a subset of my data:

Targetdistance Condition ID Undershootextent
1 63.207 0 P_200214103155 3.498000
2 63.207 0.5 P_200214103155 6.161250
3 63.207 2 P_200214103155 10.420333
4 94.810 0 P_200214103155 15.852250
5 94.810 0.5 P_200214103155 10.553000
6 94.810 2 P_200214103155 10.441000
7 142.215 0 P_200214103155 17.495000
8 142.215 0.5 P_200214103155 38.332667
9 142.215 2 P_200214103155 40.320750


data a data.frame containing the variables in the formula.
formula a formula of the form x ~ group where x is a numeric variable giving the data values and **group is a factor with one or multiple levels** giving the corresponding groups. For example, formula = TP53 ~ cancer_group .

Is Condition a factor?

hey @nirgrahamuk yes thanks I have managed to work out the problem!


I removed the paired = TRUE as I did not want paired but pairwise :slight_smile:

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

yes! I have now done so above!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.