I'm following up on this link: ggplot2 bar plot with two categorical variables
My problem is very similar – I need to do what the OP needed but I need to split the count bars by another factor.
Let me illustrate:
> var response_cat has values 0,1 (categories of a response)
>
> var group indicates belonging to a group (0,1)
>
> var item indicates the name of an item (20 strings with codes like LY1, GN6,...)
And I need to draw a graph as follows: x axis has two bars per item (for each group) y axis has relative frequencies of ones
any ideas?
thank you!