I have two dataframes. Their lengths differ.
df1:
Samples Number
A9GS 73
A9GY 142
ASNO 327
A5UE 131
df2:
Samples Number
AUFS 107
A9JY 42
AKNO 32
A9FE 111
A9GY 12
ADNO 37
A2KE 451
I have done wilcoxon test on this.
wilcox.test(df1$Number,df2$Number, correct=FALSE)
This gave me p-value. And to visualise this I used box plot function and gave an error like following.
boxplot(df1$Number ~ df2$Number, xlim=c(0.5,3))
Error in model.frame.default(formula = df1$Number ~ df2$Number) :
variable lengths differ (found for 'df2$Number')
Can anyone correct my mistake and also tell me how to get p-value on the plot. Thank you