The x axis in the time series graph (plot.ts with the ts object) is in decimal form. For example, quarter 2, 2016 on the axis will be 2016.25
There is a lubridate package that has a function (decimal_date ()) that converts POSIXct dates and decimal dates that are accepted by abline (). Therefore, I take the date when I want to put a vertical line on the plot and put it in the "Date" form. Then I can put this in the decimal_date function and in abline
install.packages("lubridate") library(lubridate) [YOUR PLOT CODE] date1 <- ymd("2013-08-01") abline(v=decimal_date(date1))
source share