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) .


zoo: S3 Infrastructure for Regular and Irregular Time Series

Overview

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:

  • Data import/export and coercion to and from other time series classes (ts, xts, timeSeries, etc.).
  • Visualization using different engines (base R, ggplot2, lattice, tinyplot).
  • Alignment and merging of series recorded at different time indexes.
  • Aggregation to coarser time intervals.
  • Lags and subsets.
  • Rolling analytics over moving time windows.
  • Time-based interpolation and filling.

Installation

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")

License

The package is available under the General Public License version 3 or version 2

Citation

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

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("zoo")

1.9-1 by Achim Zeileis, 18 days ago


https://zeileis.codeberg.page/zoo/


Report a bug at https://codeberg.org/zeileis/zoo/issues


Browse source code at https://github.com/cran/zoo


Authors: Achim Zeileis [aut, cre] (ORCID: , Gabor Grothendieck [aut] , Jeffrey A. Ryan [aut] , Joshua M. Ulrich [ctb] , Felix Andrews [ctb]


Documentation:   PDF Manual  


GPL-2 | GPL-3 license


Imports utils, graphics, grDevices, lattice

Depends on stats

Suggests AER, coda, chron, ggplot2, knitr, mondate, scales, stinepack, strucchange, timeDate, timeSeries, tinyplot, tis, tseries, xts


Imported by ACDm, AFR, ARDL, ATQ, ActCR, AeRobiology, AquaBEHER, Athlytics, BGVAR, BLSloadR, BatchGetSymbols, BigVAR, BreakPoints, CAST, CSIndicators, CSMES, CalcThemAll.PRM, CalibrationCurves, CausalImpact, CharAnalysis, CohortPlat, Coinprofile, ConnectednessApproach, ConsensusCPA, ConversationAlign, DChaos, DESA, DatastreamDSWS2R, DendroFlux, DepthProc, DisaggregateTS, Dyn4cast, DynForest, EBASE, EGRET, EHRtemporalVariability, Epi, EpiReport, EviewsR, FDboost, FlowRegEnvCost, GGIR, GLmom, GSSE, GWSDAT, HYPEtools, HyMETT, ICSKAT, ICtest, IndexConstruction, IssueTrackeR, KarsTS, LTASR, LongitudinalEvalue, MBNMAtime, MJMbamlss, MSGARCH, MarketMatching, MethodOpt, MetricGraph, MissingHandle, MuPETFlow, MultiGrey, MultivariateTrendAnalysis, OtsuSeg, PCRA, PCRedux, PERK, PMwR, PPMiss, PRISM.forecast, PWEV, PerformanceAnalytics, PheVis, PortalHacienda, PortfolioTesteR, PupilPre, PupillometryR, QuantileModels, R2Addhaz, REffectivePred, RFmerge, RGAP, RPEIF, RPESE, RQuantLib, RTL, RWDataPlyr, RavenR, RcamelsCL, RcmdrPlugin.RiskDemo, Rmfrac, SEI, SPEI, SPIChanges, SPLICE, SSplots, SVDNF, SWTools, Saylac, SeaSondeR, SharpeR, ShellChron, SherlockHolmes, SimuRg, SmartMeterAnalytics, Sojourn, StackImpute, StockDistFit, StormR, SurvMI, TCIU, TSdisaggregation, TSstudio, TTAinterfaceTrendAnalysis, TTR, TeXCheckR, TrafficBDE, TrenchR, TrendSLR, TrueWAP, TwoStepSDFM, UKgrid, URooTab, UnalR, ViralEntropR, VisitorCounts, WARDEN, WASP, WaterBalanceR, Wats, YEAB, acc, acss, actigraph.sleepr, activAnalyzer, admiralpeds, agcounts, akiFlagger, anomaly, argo, asciiSetupReader, bayesforecast, bbdetection, bfast, bgfanalyzer, blsBandit, brms.mmrm, cats, cgmanalysis, changepoint.np, chms, chronicle, climatehealth, climetrics, clinify, compIndexBuilder, conformalForecast, contTimeCausal, contagionchannels, convergenceDFM, covatest, creditr, cry, cryptoQuotes, dccmidas, degday, dendRoAnalyst, descstatsr, descsuppRplots, deseats, diemr, digiRhythm, disclosuR, dispRity, distantia, dsa, duet, dygraphs, dynatop, dynmix, edeaR, epe4md, eph, epiR, ern, estar, evalHTE, exmort, eyeris, eyetools, eyetrackingR, fDMA, fEGarch, facmodCS, facmodTS, finlabR, fluxfixer, fluxible, forecast, forecastADAPT, forecastHybrid, forecasteR, fruclimadapt, garma, gazepath, gcxgclab, gdpc, geodiv, ggPMX, ggpp, ggquickeda, gluvarpro, greybox, grwat, gstar, gstat, gunsales, hahmmr, harbinger, highcharter, highfrequency, historicalborrowlong, hpiR, htrSPRanalysis, hydroMOPSO, hydroState, hydrotoolbox, hyfo, iAR, iClick, iForecast, ichimoku, ifpd, iglu, imdR, imputeFin, imputeTestbench, influxdbr, intradayModel, jubilee, kehra, kollaR, kssa, lacunarity, lapop, lcyanalysis, ldhmm, legion, lessR, lfstat, longitudinalcascade, mMARCH.AC, mappoly, marcher, memoria, mfGARCH, midasr, mixchar, mmaqshiny, morse, morseTKTD, movementsync, movieROC, mudfold, multifamm, multilevelTools, muse, mvLSWimpute, mvMonitoring, myClim, nanotime, nixmass, nonlinearTseries, nortsTest, nparACT, npcure, nphPower, numbat, oRaklE, obAnalytics, odeGUTS, oncmap, party, pcts, pdfetch, pedquant, phase, phenocamr, phenofit, phenopix, photobiology, plm, plotthis, pmev, portalr, portfolioBacktest, postshock, praatpicture, pressuRe, qkiosk, qrmtools, quantspec, r2dii.analysis, rAmCharts, rangr, rasterVis, rbioacc, realestatebr, rechaRge, reddPrec, rjd3production, rmgarch, rmsfuns, rnrfa, robustGarch, robustbetareg, rportfolio, rts, rugarch, rumidas, runcharter, s2dv, sGMRFmix, sandwich, sazedR, scDIFtest, seasonalityPlot, seasonalview, seastests, sectorgap, segclust2d, semtree, sfc, shrinkTVP, shrinkTVPVAR, sirad, sisireg, skytrackr, smooth, smoothy, smplot2, soundClass, spacetime, ssaBSS, stCEG, staRdom, starvars, starvz, statcomp, svars, sysid, syuzhet, tableone, tagtools, taxize, tbl2xts, tectonicr, telemetR, testcorr, tf, tfarima, tibbletime, tidychangepoint, tidyextreme, tidyquant, tigerhitteR, timetk, topolow, trackeRapp, trajectories, tripEstimation, tsBSS, tsaux, tscopula, tsdb, tsensembler, tseries, tseriesTARMA, tsgarch, tsgc, tsissm, tsmarch, tsmethods, tsrobprep, tssim, tswge, tvGarchKF, umx, valdrViz, vcrpart, voice, wevid, whep, whippr, wql, x3ptools, xaci, yfR, yrnd.

Depended on by AER, EloRating, EnvCpt, Evapotranspiration, FFdownload, FinTS, FinancialInstrument, GCEstim, GroupBN, HEDA, IBrokers, Modalclust, NitrogenUptake2016, PortfolioAnalytics, RJSDMX, RcmdrPlugin.temis, Riex, RolWinMulCor, SWMPr, StreamMetabolism, betategarch, bimets, bsts, changepoint, dendrometeR, disagmethod, dyn, dynlm, eDMA, fxregime, garchx, geotopbricks, geovol, gets, gfunctions, glogis, hydroGOF, hydroTSM, lgarch, lmtest, matrixProfile, meteoForecast, mvLSW, neverhpfilter, quantmod, sde, solaR, strucchange, strucchangeRcpp, swash, tgram, trackeR, tstools, tvgarch, vioplot, xts, yuima.

Suggested by AGHmatrix, APRScenario, BIS, BISdata, BOJ, Boom, COINT, DDESONN, ELAplus, ETLUtils, Ecfun, FARS, FatTailsR, GDPuc, JFE, MBNMAdose, MacroFilters, Markovchart, MazamaRollUtils, NMOF, NPRED, RGraphics, RTransferEntropy, Rbearcat, Rblpapi, RcppRoll, SNBdata, SeroTrackR, SlidingWindows, SpaceTimeBSS, UsingR, XLConnect, aeddo, animation, bamlss, baseballr, baselinenowcast, berryFunctions, betaARMA, bidask, birddog, blsR, broom, bundesbank, clubSandwich, collapse, conos, copula, csdata, csemTools, cvdprevent, dang, dartR, dartR.base, dartR.popgen, data.table, ddplot, dint, eatRep, ecb, exdex, factorstochvol, fanplot, fftab, fredr, frequencyConnectedness, funData, fy, genscore, ggchangepoint, ggfortify, glarma, gsubfn, healthyR.ts, imputeTS, investdatar, kronxNBC, kyotil, latticeExtra, locuszoomr, loopevd, lpirfs, ltxsparklines, maidr, manifestoR, meboot, mitey, mlr3forecast, mnirs, mondate, mscstts, msdrought, multipleITScontrol, networktree, nvmix, pander, paneltests, patterncausality, pctax, pscl, quantreg, read.gt3x, roll, rolleigen, rolloptim, rollshap, rroad, sentopics, sfdep, sharpshootR, shinymeta, smqf, stars, sweep, synthesis, tactile, talib, timeSeries, timeplyr, tradesimr, tsbox, tseffects, unitrootests, winfapReader, wooldridge, xkcd, xtable, zenplots.

Enhanced by chron, dendextend, lattice, lubridate, tind, tis.


See at CRAN