I have a date-frame with the structure below. I want to make a simple bar chart that lists the "CID" by type (A, B, C, etc ...) with the days of removal and the other with the Meetings.
df <- data.frame(CID = c("A", "A", "B", "C", "C", "Z"),
AFASTAMENTOS = c(2,3,5,8,9, 12),
ATENDIMENTOS = c(21, 32, 4, 6, 7, 43),
stringAsfactors = FALSE )
I tried with ggplot2, making the CID variable a factor:
ggplot(df, aes(CID, y = AFASTAMENTOS)) + geom_bar()
That returned me: Error: stat_count () must not be used with a and aesthetic.
Thank you very much,