Type: Package Package: roll Title: Rolling and Expanding Statistics Version: 1.2.2 Authors@R: person("Jason", "Foster", , "jason.j.foster@gmail.com", role = c("aut", "cre")) Description: Fast and efficient computation of rolling and expanding statistics for time-series data. The default algorithm in the 'roll' package is an online algorithm that, as observations are added to and removed from a window, updates statistics and discards observations from memory (Welford, 1962, ; West, 1979, ); as a result, the amount of time to evaluate each function is significantly shorter as the computation is independent of the window. In contrast, an offline algorithm requires all observations in memory to calculate the statistic for each window, so users can trade speed for accuracy and select the offline algorithm by setting the online argument to FALSE. Quantiles are computed from the inverse of the empirical distribution function with averaging at discontinuities (Hyndman and Fan, 1996, ). Use cases include rolling summary statistics, time-varying relationships between variables, and feature engineering for forecasting and signal construction. The package supports rolling and expanding windows, weights, and handling of missing values via the min_obs, complete_obs, and na_restore arguments. The implementation uses 'RcppParallel' to parallelize the online algorithms across columns and the offline algorithms across windows. License: GPL (>= 2) URL: https://github.com/jasonjfoster/roll BugReports: https://github.com/jasonjfoster/roll/issues Depends: R (>= 3.5.0) Imports: Rcpp, RcppParallel Suggests: covr, testthat, zoo LinkingTo: Rcpp, RcppArmadillo, RcppParallel Config/roxygen2/old_usage: TRUE Config/roxygen2/version: 8.0.0 Encoding: UTF-8 SystemRequirements: GNU make Config/pak/sysreqs: make Repository: https://fastverse.r-universe.dev Date/Publication: 2026-06-17 22:37:21 UTC RemoteUrl: https://github.com/jasonjfoster/roll RemoteRef: HEAD RemoteSha: 84890c8278f12e0723c69532f021d8db5ea74013 NeedsCompilation: yes Packaged: 2026-06-21 11:05:21 UTC; root Author: Jason Foster [aut, cre] Maintainer: Jason Foster