I have just started playing with the ts
class to analyze some time series data I have.
I am getting a sense that the ts
class is not well s
zoo
works well with daily data. For example, if you had a daily series of streamflows in a vector Q and with corresponding date stamps D (created using as.Date()
, for example).
Q.z <- zoo(Q, order.by=D)
will create an object that will plot nicely and you can use functions such as window()
to extract single years e.g.
window(Q.z, start = as.Date('2000-01-01'), end=as.Date('2000-31-12')
Check the zoo
package for more information.