I want to add some lines to the chart.
You usually specify abline(v=x-intercept) , but my x axis is in the form Jan-95 - Dec-09. How can I adapt the abline code to add a vertical line, for example, in February-95?
I tried abline(v=as.Date("Jan-95")) and other variations of this code snippet.
After that, you can add several vertical lines with one piece of code, for example Feb-95, Feb-97 and Jan-98?
An alternative solution could be to change my plot, I have a column with information of the month and a column with information of the year, how can I work with them to have a year on the X axis?
example[25:30,] Year Month YRM TBC 25 1997 1 Jan-97 136 26 1997 2 Feb-97 157 27 1997 3 Mar-97 163 28 1997 4 Apr-97 152 29 1997 5 May-97 151 30 1997 6 Jun-97 170
source share