splityears | R Documentation |
Split an xts object either into hydrological or calendar years.
splityears(x, type = "hydro")
x |
an xts object |
type |
String. Either 'hydro' for hydrological years or 'calendar' for splitting into calendar years |
Split an xts object into years. One can chose between hydrological years starting with October 1st or calendar years starting with January 1st.
A list where each entry contains a single year
Simon Frey
yearplot
# load runoff data
data(runoff)
summary(runoff)
# split data into hydrological years
x <- splityears(runoff)
summary(x)
# split data into calendar years
x <- splityears(runoff, "calendar")
summary(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.