I am having the following sample data:
a <- data.frame()
a <- cbind(sample(1:4, 100,replace = T))
a <- cbind(a,sample(0:1, 100,replace = T))
colnames(a) <- c("Group","Event")
I want to plot a barplot where the X-axis is the group, and the Y-axis is of the percentage of events in each group, with the N of the group in the plot itself. How to plot?