I would like to have two bar charts on the same plot.
Let's say these two bar charts will be based on a variable Var1 with two levels (Var1 is a column in the table). I have the frequencies in the same table where x represents the counts and y represents different levels of interest. If I use the below code, then I get them on the same plot but it shows the results for two levels of Var1 on the same bar for a level of y. I would like to have two bars side by side representing two levels of Var1 for a level of y. How do I do that? Thanks!
ggplot(data,aes(x,y,fill=Var1)) + geom_bar(stat="identity")
datawould be rly helpful to those you're seeking help from