I am trying to display a scatterplot of the Yield per batch of a product: (make-up of that dataset)
| Batch | Yield |
|---|---|
| PROD_191105001 | 88 |
| PROD_191106002 | 87 |
| PROD_191107003 | 86 |
| PROD_200203001 | 98 |
| PROD_200204002 | 99 |
| PROD_200205003 | 96 |
Now, I have a nice scatterplot for that, with average and quality chart rules (95th percentile 99th percentile) displayed.
I want to compare last years Batches to this years batches. The dots of last years batches should be greyed-out:

my spaghetti for that image:
ggplot(data=data) +
+ geom_point(aes(x=Batch, y=`normalized yield`))+
+ geom_hline(aes(yintercept = 115), colour = "green", size=1)+ %%set limit
+ geom_hline(aes(yintercept = 140), colour = "green", size=1)+ %%set limit
+ geom_hline(aes(yintercept=(mean(`normalized yield`)-2*sd(`normalized yield`))), colour = "blue", size=1)+
+ geom_hline(aes(yintercept=(mean(`normalized yield`)+2*sd(`normalized yield`))), colour = "blue", size=1)+
+ geom_hline(aes(yintercept=(mean(`normalized yield`)-3*sd(`normalized yield`))), colour = "red", size=1)+
+ geom_hline(aes(yintercept=mean(`normalized yield`)), linetype = "dashed")+
+ theme(axis.ticks = element_blank(), axis.text.x = element_blank())+
+ labs(title="Product Yield ", y="normalized yield in g", x= "Batch")
How do I tell R to split this dataset at a specific point, so I can change the colour makeup of that part?