[R] Time series labeling with Zoo

Gad Abraham g.abraham at ms.unimelb.edu.au
Fri Jun 23 05:48:33 CEST 2006


Hi,

I'm using zoo because it can automatically label the months of a time 
series composed of daily observations.

This works well for certain time series lengths, but not for others, e.g.:

While:

 > library(zoo)
 > plot(zoo(runif(10), as.Date("2005-06-01") + 0:50))

Shows up the months and day of month,

 > plot(zoo(runif(10), as.Date("2005-06-01") + 0:380))

results in a single label "2006" in the middle of the x axis, with no 
months labelled, although there's plenty of room for labels.


How do I get zoo to label the months too, without having to manually 
work out which day was the first day of each month?


I'm using zoo 1.0-3 with R 2.2.1.

Thanks,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Parkville 3010, Victoria, Australia
email: g.abraham at ms.unimelb.edu.au
web: http://www.ms.unimelb.edu.au/~gabraham



More information about the R-help mailing list