I have just two groups with the certain (not equal to each other) numbers of the trait observations within each group. The trait has only two levels- 0 and 1 (i.e. this trait is binary). For example: we have case and control groups. There are 280 infected (1 state) and 20 uninfected (0 state of the trait) plants (300 totally) in control group. In case group we see 250 uninfected plants (0 state of the trait) and 80 infected ones (1 state) (330 totally). I'd like to show that proportions of infected/uninfected plants are different in these groups.
My solution in
R base was (just toy example):
case=seq(0,0,,length.out = 50) control=seq(1,1,length.out = 50) boxplot(case,control,names = c('case','control'))
I'm wondering if there is more elegant solution. Any help would be highly appreciated.