Forgive me for this basic question. I have loaded a set of data as timeSeries in R.
> class(Return)
[1] "timeSeries"
attr(,"package")
[1] "timeSeries"
> head(Return[,1])
GMT
Overall
2005-09-21 1.8714
2005-09-22 0.2049
2005-09-23 -1.5924
2005-09-26 -4.3111
2005-09-27 -0.2416
2005-09-28 -1.1924
When I plot this time series data, it gives me a figure with date as the label of x-axis with format "2006-01-01", "2007-01-01". How can I customise it as "2006-01" or "2006" or "2006 Jan" and how can I modify the frequency? For example I’d like to have a tick every half year instead of every year?
Any suggestion? Thank you!
For the label format you can use the
formatparameter (for info about the format options have a look at this page):While for the labels, you can set custom labels by using the
atparameter, e.g. :For more info about the
plotparameters fortimeSeriesobjects, just type: