Count and Percent Together using Stack Bar in R
问题 I am trying to create stack bar with counts and percent in same graph. I took help from Showing data values on stacked bar chart in ggplot2 and add group total and plotted my as By using code ### to plot stacked bar graph with total on the top and ### distribution of the frequency; library(ggplot2); library(plyr); library(dplyr); Year <- c(rep(c("2006-07", "2007-08", "2008-09", "2009-10"), each = 4)) Category <- c(rep(c("A", "B", "C", "D"), times = 4)) Frequency <- c(168, 259, 226, 340, 216,