My dataset looks like below,
dat <- data.frame(ID = c(150,151,155,155,155,155,150), year = c(1995,2011,2012,2012,2013,2012,2013), Acceptance = c(no,yes,yes,yes,yes,no,no));
I wanted to plot a bar chart, for ID 155, with X-axis over the Year, and var 3 Which shows only Yes.
I have tried the below code
cl_d <- dat %>%
filter(ID==155)%>%
filter(year(Date)>2000)%>%
group_by(ID, year)%>%
summarise(count=n())
ggplot(cl_d, aes(year, count))+
geom_bar(stat='identity')
The bar plot should show the count of Acceptance for "Yes" over the Date greater than 2000 for the particular ID 155

