this might be a simple question. I have a big df of clinical data called d.
head(d[,c("catCRP","ageCat")])
catCRP ageCat
1 <4 (50,66]
2 >4 (40,50]
3 >4 (30,40]
4 <4 (50,66]
5 >4 (30,40]
6 >4 (30,40]
I am plotting it with ggplot2:
ggplot(d,aes(x=ageCat,fill=catCRP))+geom_bar(position="fill")
In this case, ggplot draws the percentages in each category.
Is it possible to make it add the percentage numbers AND the actual count to the plot?
I'm a beginner, I have looked in all the documentation but I have not found the answer.