Hi I am trying to make this graph display the number of the count for each bar above it
sumrc<-ggplot(subset(longdata,!is.na(summresolution)),
aes(x=summresolution, fill=summresolution))
sumrcbycount <- sumrc +
geom_bar(stat = "count") +
coord_flip() +
scale_fill_brewer(palette="Paired")+
theme(axis.title.x=element_blank(),axis.title.y=element_blank(),legend.title = element_blank(),legend.position = 'none')
i feel like i should be using geom_text()
but honestly have no idea what to do, all the examples seem to be using stat= identity
. I am new to R so please be very thorough in your explanation.
edit* here is a piece of the vector i'm building the graph from, the overall data set is massive, so this should suffice.
summresolution = c("Resolved by current supplier", "Resolved by current supplier",
"Resolved by current supplier", "Supplier educated", "Beneficiary Educated",
"Supplier educated", "Beneficiary Educated", "Beneficiary Educated",
"Beneficiary Educated", "Beneficiary Educated", "Beneficiary Educated",
"Unresolved", "Unresolved", "Beneficiary Educated", "Resolved by current supplier",
"Resolved by current supplier", "Beneficiary Educated", "Beneficiary Educated",
"New supplier Found", "Beneficiary Educated")