[R] newbie needs help plotting time series

From: Kathi <kathi_at_dropnet.ch>
Date: Mon, 30 Jun 2008 11:14:48 +0200


Dear R help list

I have recently started using R to visualize time series of water level measurements. The code I wrote does exactly what I want:

plot(x, a$B112, axes=FALSE, ylim=c(405,410), col="red", pch=15, type="o", ylab="metres above sea level", main="Main Plot Title") axis(2, at=405:410, tck=1, col="gray60")

axis.Date(1, at=seq(as.Date("2004-01-01"), as.Date("2008-06-01"), 
by="month"), labels=seq(as.Date("2004-01-01"), as.Date("2008-06-01"), 
by="month"), tck=1, col="gray60")

Now I wanted to shift the data visualized by 6 months, so I replaced "2004-01-01" by "2004-07-01" and "2008-06-01" by "2008-12-01". Instead of the desired plot, I get an error message stating (forgive the perhaps faulty translation into English, I'm working on a German version of R):

mistake in axis(side, at = z, labels = labels, ...) :   length of 'at' and 'labels' different, 50 != 54

What have I done wrong? Thank you very much for your help!

Katharina Dubach



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 30 Jun 2008 - 09:18:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 30 Jun 2008 - 11:31:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive