I want a plot like this except that each facet sums to 100%. Right now group M is 0.05+0.25=0.30 instead of 0.20+0.80=1.00.
df <- rbind( data.frame(g
here's another way
ggplot(df, aes(outcome)) + geom_bar(aes(y = ..count.. / sapply(PANEL, FUN=function(x) sum(count[PANEL == x])))) + facet_wrap(~gender, nrow=2, ncol=1)