start by understanding how NA' values got into your data.
one way to find them is
missing_rows<- filter_all(d %>%
mutate(Date = factor(Date,
levels = c("Jan-20", "Feb-20", "Jun-20", "Jul-20"))), any_vars(is.na(.)))
its complicated because you don't store the post manipulated d that goes into ggplot
d_to_plot <- d %>%
mutate(Date = factor(Date,
levels = c("Jan-20", "Feb-20", "Jun-20", "Jul-20")))
ggplot(data=d_to_plot,aes(fill=Provider, y=Appointments, x=Date)) +
geom_bar(position="stack", stat="identity") +
geom_text(data=totals, aes(x=Date, label=total, y=total, fill=NULL), nudge_y=10) +
theme_minimal() +
theme(text=element_text(size=18))
in which case you would analyse
missing_rows<- filter_all(d_to_plot, any_vars(is.na(.)))
thats not to say totals shouldnt be explored