zoo: S3 Infrastructure for Regular and Irregular Time Series (Z's Ordered Observations)

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) <doi:10.18637/jss.v014.i06>.

Version: 1.9-0
Depends: R (≥ 3.1.0), stats
Imports: utils, graphics, grDevices, lattice (≥ 0.20-27)
Suggests: AER, coda, chron, ggplot2 (≥ 3.5.0), knitr, mondate, scales, stinepack, strucchange, timeDate, timeSeries (≥ 4021.104), tinyplot, tis, tseries, xts
Published: 2026-07-31
DOI: 10.32614/CRAN.package.zoo
Author: Achim Zeileis ORCID iD [aut, cre], Gabor Grothendieck [aut], Jeffrey A. Ryan [aut], Joshua M. Ulrich [ctb], Felix Andrews [ctb]
Maintainer: Achim Zeileis <Achim.Zeileis at R-project.org>
BugReports: https://codeberg.org/zeileis/zoo/issues
License: GPL-2 | GPL-3
URL: https://zeileis.codeberg.page/zoo/
NeedsCompilation: yes
Citation: zoo citation info
Materials: README, NEWS
In views: Econometrics, Environmetrics, Finance, MissingData, TimeSeries
CRAN checks: zoo results

Documentation:

Reference manual: zoo.html , zoo.pdf
Vignettes: zoo Design (source)
zoo FAQ (source, R code)
zoo Quick Reference (source, R code)
Reading Data in zoo (source, R code)
zoo Reference Card (source)
zoo: An S3 Class and Methods for Indexed Totally Ordered Observations (source, R code)

Downloads:

Package source: zoo_1.9-0.tar.gz
Windows binaries: r-devel: zoo_1.8-15.zip, r-release: zoo_1.8-15.zip, r-oldrel: zoo_1.9-0.zip
macOS binaries: r-release (arm64): zoo_1.9-0.tgz, r-oldrel (arm64): zoo_1.9-0.tgz, r-release (x86_64): zoo_1.9-0.tgz, r-oldrel (x86_64): zoo_1.9-0.tgz
Old sources: zoo archive

Reverse dependencies:

Reverse depends: AER, betategarch, bimets, bsts, changepoint, dendrometeR, disagmethod, dyn, dynlm, eDMA, EloRating, EnvCpt, Evapotranspiration, fCI, FFdownload, FinTS, fxregime, garchx, GCEstim, geotopbricks, geovol, gets, gfunctions, glogis, GroupBN, HEDA, hydroGOF, hydroTSM, IBrokers, lgarch, lmtest, matrixProfile, meteoForecast, Modalclust, mvLSW, neverhpfilter, NitrogenUptake2016, PortfolioAnalytics, quantmod, RcmdrPlugin.temis, Riex, RJSDMX, RolWinMulCor, sde, solaR, StreamMetabolism, strucchange, strucchangeRcpp, swash, SWMPr, tgram, trackeR, tstools, tvgarch, vioplot, vulcan, xts, yuima
Reverse imports: acc, ACDm, acss, ActCR, actigraph.sleepr, activAnalyzer, adductomicsR, admiralpeds, AeRobiology, AFR, agcounts, akiFlagger, anomaly, AquaBEHER, ARDL, argo, asciiSetupReader, ASICS, Athlytics, ATQ, BatchGetSymbols, bayesforecast, bbdetection, bfast, BGVAR, BigVAR, blsBandit, BLSloadR, BreakPoints, brms.mmrm, CalcThemAll.PRM, CalibrationCurves, CAST, cats, CausalImpact, cgmanalysis, changepoint.np, CharAnalysis, chronicle, climatehealth, climetrics, clinify, CohortPlat, Coinprofile, compIndexBuilder, CONFESS, conformalForecast, ConnectednessApproach, contagionchannels, contTimeCausal, convergenceDFM, ConversationAlign, covatest, creditr, cry, cryptoQuotes, CSIndicators, CSMES, dataprep, DatastreamDSWS2R, dccmidas, DChaos, degday, dendRoAnalyst, DepthProc, DESA, descstatsr, descsuppRplots, deseats, diemr, digiRhythm, DisaggregateTS, disclosuR, dispRity, distantia, dsa, dStruct, duet, dygraphs, Dyn4cast, dynatop, DynForest, dynmix, EBASE, edeaR, EGAD, EGRET, EHRtemporalVariability, ELViS, epe4md, eph, Epi, epiR, EpiReport, ern, estar, evalHTE, EviewsR, exmort, eyeris, eyetools, eyetrackingR, facmodCS, facmodTS, FDboost, fDMA, fEGarch, finlabR, FlowRegEnvCost, flowSpecs, fluxfixer, fluxible, forecast, forecastADAPT, forecasteR, forecastHybrid, fruclimadapt, garma, gazepath, gcxgclab, gdpc, geodiv, GGIR, ggPMX, ggpp, ggquickeda, GLmom, gluvarpro, greybox, grwat, GSSE, gstar, gstat, gunsales, GWSDAT, hahmmr, harbinger, highcharter, highfrequency, historicalborrowlong, hpiR, htrSPRanalysis, hydroMOPSO, hydroState, hydrotoolbox, hyfo, HyMETT, HYPEtools, iAR, ichimoku, iClick, ICSKAT, ICtest, iForecast, ifpd, iglu, imdR, imputeFin, imputeTestbench, IndexConstruction, influxdbr, intradayModel, jubilee, KarsTS, kehra, kofdata, kollaR, kssa, lacunarity, lapop, lcyanalysis, ldhmm, legion, lessR, lfstat, Linnorm, locuszoomr, longitudinalcascade, LTASR, mappoly, marcher, MarketMatching, MBNMAtime, memoria, metaseqR2, MethodOpt, MetricGraph, mfGARCH, MicrobiotaProcess, midasr, MissingHandle, mixchar, MJMbamlss, mmaqshiny, mMARCH.AC, moanin, morse, morseTKTD, MOSim, movementsync, movieROC, MSGARCH, mudfold, multifamm, MultiGrey, multilevelTools, MultivariateTrendAnalysis, MuPETFlow, muse, mvLSWimpute, mvMonitoring, myClim, nanotime, ngsReports, nixmass, nonlinearTseries, nortsTest, nparACT, npcure, nphPower, numbat, obAnalytics, odeGUTS, oncmap, oRaklE, OtsuSeg, party, PCRA, PCRedux, pcts, pdfetch, pedquant, PerformanceAnalytics, periodicDNA, PERK, phase, phenocamr, phenofit, phenopix, PheVis, photobiology, PhyloProfile, plm, plotthis, pmev, PMwR, PortalHacienda, portalr, portfolioBacktest, PortfolioTesteR, postshock, PPMiss, praatpicture, pressuRe, PRISM.forecast, PupillometryR, PupilPre, PWEV, qkiosk, qrmtools, qsea, QuantileModels, quantspec, R2Addhaz, r2dii.analysis, rAmCharts, rangr, rasterVis, RavenR, rbioacc, RcamelsCL, RcmdrPlugin.RiskDemo, realestatebr, rechaRge, reddPrec, REffectivePred, RFmerge, RGAP, rjd3production, Rmfrac, rmgarch, rmsfuns, RNAshapeQC, rnrfa, robustbetareg, robustGarch, RPEIF, RPESE, rportfolio, RQuantLib, RTL, rts, rugarch, rumidas, runcharter, RWDataPlyr, s2dv, sandwich, Saylac, sazedR, scDIFtest, seasonalityPlot, seasonalview, SeaSondeR, seastests, sectorgap, segclust2d, SEI, semtree, sfc, sGMRFmix, SharpeR, ShellChron, SherlockHolmes, shrinkTVP, shrinkTVPVAR, SimuRg, sirad, sisireg, skytrackr, SmartMeterAnalytics, smooth, smoothy, smplot2, Sojourn, soundClass, soundgen, spacetime, SPEI, SPIChanges, SPLICE, ssaBSS, SSplots, StackImpute, staRdom, starvars, starvz, statcomp, stCEG, StockDistFit, StormR, SurvMI, svars, SVDNF, SWTools, sysid, syuzhet, tableone, tagtools, taxize, tbl2xts, TCIU, tectonicr, telemetR, testcorr, TeXCheckR, tf, tfarima, ThomasJeffersonUniv, tibbletime, tidychangepoint, tidyextreme, tidyquant, tigerhitteR, timetk, TMixClust, trackeRapp, TrafficBDE, trajectories, TrenchR, tripEstimation, TrueWAP, tsaux, tsBSS, tscopula, tsdb, TSdisaggregation, tsensembler, tseries, tseriesTARMA, tsgarch, tsgc, tsissm, tsmarch, tsmethods, tsrobprep, tssim, TSstudio, tswge, TTAinterfaceTrendAnalysis, TTR, TwoStepSDFM, UKgrid, UMI4Cats, umx, URooTab, valdrViz, vcrpart, ViralEntropR, VisitorCounts, voice, VplotR, WARDEN, WASP, WaterBalanceR, Wats, wevid, whep, whippr, wql, x3ptools, YEAB, yfR, yrnd
Reverse linking to: xts
Reverse suggests: aeddo, AGHmatrix, animation, APRScenario, AUCell, bamlss, baseballr, baselinenowcast, berryFunctions, betaARMA, bidask, birddog, BIS, BISdata, blsR, BOJ, broom, bundesbank, ChIPsim, clubSandwich, COINT, collapse, conos, constructive, copula, csdata, csemTools, cvdprevent, dang, dartR, dartR.base, dartR.popgen, data.table, DDESONN, ddplot, dint, eatRep, ecb, Ecfun, ELAplus, ETLUtils, exdex, factorstochvol, fanplot, FARS, FatTailsR, fftab, fredr, frequencyConnectedness, funData, fy, GDPuc, genscore, ggfortify, glarma, glmGamPoi, gsubfn, healthyR.ts, imputeTS, JFE, kronxNBC, kyotil, latticeExtra, loopevd, lpirfs, ltxsparklines, MacroFilters, maidr, manifestoR, Markovchart, MazamaRollUtils, MBNMAdose, meboot, mitey, mlr3forecast, mnirs, mondate, mscstts, msdrought, MSnbase, multipleITScontrol, networktree, ngme2, NMOF, NPRED, nvmix, pander, paneltests, patterncausality, pctax, pscl, quantreg, Rbearcat, Rblpapi, RcppRoll, read.gt3x, recoup, RGraphics, roll, rolleigen, rolloptim, rollshap, rroad, RTransferEntropy, scITD, sentopics, SeroTrackR, sfdep, sharpshootR, shinymeta, SlidingWindows, smqf, SNBdata, SpaceTimeBSS, stars, sweep, synthesis, tactile, timeplyr, timeSeries, tsbox, tseffects, unitrootests, UsingR, winfapReader, wooldridge, xkcd, XLConnect, xtable, zenplots
Reverse enhances: chron, dendextend, lattice, lubridate, tind, tis

Linking:

Please use the canonical form https://CRAN.R-project.org/package=zoo to link to this page.