I had a dataset with only two groups and I kept getting
> add_pval(p1)
Error in wilcox.test.formula(data = data_2_test, response ~ group__, ...) :
grouping factor must have exactly 2 levels
It took me a stupid amount of time to figure out that pairs = list(c(1,2), c(1,3) is the default and I need to make sure to set pairs explicitly every time.
I had a dataset with only two groups and I kept getting
It took me a stupid amount of time to figure out that
pairs = list(c(1,2), c(1,3)
is the default and I need to make sure to setpairs
explicitly every time.You could place
right in the beginning with
pairs = NULL
in the arguments. For simple plots, you could just useadd_pval(plot)
for simplicity.