Error: grouping factor must have exactly 2 levels

1k views Asked by At

I know that many have asked the exact same thing, but nothing solved it for me...

I want to compare the size of a morphological structure between two age groups (which I call BW and brownish), I'm sure I only have these two categories and there are no empty cells or NAs

But every time I try it appears that I have more than 2 levels

I can't use the levels function either, it returns null, str(dd1) returns male_color is a Character Datatype and the Right_tarsus is a number Datatype data, as the spected

the morphological data also worked well in the ggdensity and shapiro.test to test normality,

MU_test_color_tarsus <- wilcox.test(Right_tarsus ~ male_color, data = dd1, paired = F, conf.level = 0.95) 
wilcox.test(Right_tarsus ~ male_color, data = dd1, paired = F, conf.level = 0.95)
0

There are 0 answers