An S3 class with methods for working with regular and irregular time series.
The class stores data as numeric vectors/matrices (or factors) along with a time index of arbitrary class
(including numeric, Date, POSIXct, chron, yearmon, yearqtr, etc.). Functions and methods
are consistent with the ts class and base R and also extend standard generics. Tools include:
Data import/export, coercion, visualization (with base R, 'ggplot2', 'lattice', 'tinyplot'), alignment and merging,
aggregation, lags and subsets, rolling analytics, and time-based interpolation/filling.
The design is introduced in Zeileis and Grothendieck (2005)
The R package zoo provides an S3
class zoo for working with regular and irregular time series. The
class stores data as numeric vectors/matrices (or factors) along with a
time index which can be of arbitrary class (including numeric,
Date, POSIXct, chron, yearmon, yearqtr). Functions and methods
for zoo are consistent with the ts class and base R and also extend
standard generics. Tools include:
ts, xts, timeSeries, etc.).ggplot2, lattice, tinyplot).The stable version of zoo is available from
CRAN:
install.packages("zoo")
The latest development version can be installed from R-universe:
install.packages("zoo", repos = "https://zeileis.R-universe.dev")
The package is available under the General Public License version 3 or version 2
Zeileis A, Grothendieck G (2005). “zoo: S3 Infrastructure for Regular and Irregular Time Series.” Journal of Statistical Software, 14(6), 1-27. doi:10.18637/jss.v014.i06