I've created a daily time series. Original data:
> head(platinum)
Date Hong.Kong.8.30
1 2019-12-19 938
2 2019-12-18 929
3 2019-12-17 933
4 2019-12-16 931
5 2019-12-13 947
6 2019-12-12 943
I used the zoo
package, and it still showed dates:
> plat2=read.zoo(platinum)
> tail(plat2,30)
2019-11-08 2019-11-11 2019-11-12 2019-11-13 2019-11-14 2019-11-15
913 894 880 876 878 885
2019-11-18 2019-11-19 2019-11-20 2019-11-21 2019-11-22 2019-11-25
896 899 915 923 917 897
After as.ts
, however, the dates are stored as integers:
> as.ts(plat2)
Time Series:
Start = 8217
End = 18249
Frequency = 1
And the plot is in intergers too: time series plot
I want the x axis to have intervals of a decade. Any help is appreciated.