i have some trouble with the plots of my dataset. This is an extract of my dataset.
Date Month Year Value 1
30/05/96 May 1996 1835
06/12/96 December 1996 1770
18/03/97 March 1997 1640
27/06/97 June 1997 1379
30/09/97 September 1997 1195
24/11/97 November 1997 1335
13/03/98 March 1998 1790
07/05/98 May 1998 349
14/07/98 July 1998 1179
27/10/98 October 1998 665
What I would like to do is a plot with Value 1 (y) against the mount (x) for every year. In other words, a plot with 3 lines that show the variation of Value 1 every month in th different years.
I do the following:
plot(x[Year==1996,4], xaxt="n")
par(new=T)
plot(x[Year==1997,4], xaxt="n")
axis(1, at=1:length(x$Month), labels=x$Month)
The problem is that the first value of 1996 refers to may, and the first value of 1997 refers to march. Due to that, the values plotted are mixed and don't correspond to their month anymore. Is there a way to plot all these values in the same graph keeping the original correspondence of the data?