Drawing blank here. I would like a chart with three bars for the three types with each bar being a sum of the total of each type. A should be 27; B, 36; and C, 11.
My data and attempt:
library(tidyverse)
type <- c("A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "C", "C")
quant <- c("2", "9", "5", "11", "2", "9", "12", "2", "6", "5", "5", "6")
dat <- data.frame(type, quant)
ggplot(dat, aes(y=type)) + geom_bar()
Thanks,
Jeff