Trying to make a stacked bar plot with my data and I this error keeps popping up:
Error: geom_bar requires the following missing aesthetics: x and y
rlang::last_error() to see where the error occurred.
My code is:
load("H:\\Personal\\provider1.csv") d=provider1.csv("provider1.cvs", header=T) library(ggplot2) Provider<-d$Provider Date<- d$Date Appointments<- d$Appointments ggplot(d, aes(fill=Date, y=Appointments, x=Provider)) + geom_bar(position="fill", stat="identity")
My data is pretty much in the same format as it is on this website:
with the only exception being that, what I have as my 'fill' and 'x' are swapped in position.