Hi,
I could not plot these table below, as there is space at "Number of deliveries" and number on time.
| Month |
Number of deliveries |
Number On Time |
Percent |
| Jan-10 |
1086 |
1069 |
98.4% |
| Feb-10 |
1101 |
1080 |
98.1% |
| Mar-10 |
1116 |
1089 |
97.6% |
| Apr-10 |
1216 |
1199 |
98.6% |
I am trying to plot all but I am not sure how should i remove the space
May I know how should I remove or keep the space same as excel table?
my code as below:
> #Read "On-time delivery " excel file
> OnTimeDelivery <- read_excel("Q2.xlsx", range ="OnTimeDeliv!A3:D63")
> #GGplot (facelet) for dealer survey count
> DeliveryPlot <-ggplot(data = OnTimeDelivery, aes(x = Number$of$deliveries, y = Number$On$Time, fill = Percent)) + geom_bar(stat = "identity", position = "dodge") + geom_text(aes(label=Count),size =4, colour="Blue") + facet_grid(Year ~ Region) + labs(title="Dealer Satisfaction" , x="Scale", y="Count", fill="Region") +theme(plot.title=element_text(hjust=0.5))
I got this error
Error: At least one layer must contain all faceting variables: `Year`.
* Plot is missing `Year`
* Layer 1 is missing `Year`
* Layer 2 is missing `Year`
I tried to use plot function, still cannot plot due to "space" in excel column