Package: roll 1.2.2

Jason Foster

roll: Rolling and Expanding Statistics

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, <doi:10.1080/00401706.1962.10490022>; West, 1979, <doi:10.1145/359146.359153>); 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, <doi:10.1080/00031305.1996.10473566>). 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.

Authors:Jason Foster [aut, cre]

roll_1.2.2.tar.gz
roll_1.2.2.zip(r-4.7)roll_1.2.2.zip(r-4.6)roll_1.2.2.zip(r-4.5)
roll_1.2.2.tgz(r-4.6-x86_64)roll_1.2.2.tgz(r-4.6-arm64)roll_1.2.2.tgz(r-4.5-x86_64)roll_1.2.2.tgz(r-4.5-arm64)
roll_1.2.2.tar.gz(r-4.7-arm64)roll_1.2.2.tar.gz(r-4.7-x86_64)roll_1.2.2.tar.gz(r-4.6-arm64)roll_1.2.2.tar.gz(r-4.6-x86_64)
roll_1.2.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
roll/json (API)
NEWS

# Install 'roll' in R:
install.packages('roll', repos = c('https://fastverse.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jasonjfoster/roll/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

algorithmsrcppstatisticsopenblascppopenmp

9.80 score 118 stars 11 packages 398 scripts 4.5k downloads 1 mentions 18 exports 3 dependencies

Last updated from:8dabce8da4. Checks:13 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK211
linux-devel-x86_64OK213
source / vignettesOK230
linux-release-arm64OK204
linux-release-x86_64OK210
macos-release-arm64OK152
macos-release-x86_64OK315
macos-oldrel-arm64OK139
macos-oldrel-x86_64OK327
windows-develOK193
windows-releaseOK197
windows-oldrelOK187
wasm-releaseOK115

Exports:roll_allroll_anyroll_corroll_covroll_crossprodroll_idxmaxroll_idxminroll_lmroll_maxroll_meanroll_medianroll_minroll_prodroll_quantileroll_scaleroll_sdroll_sumroll_var

Dependencies:RcppRcppArmadilloRcppParallel