miller/docs
John Kerl 10939349d2
Add sliding-window mode to mlr stats1 via -w {n} (#1017) (#2186)
* Add sliding-window mode to stats1 via -w {n} (#1017)

This adds a generic sliding-window option to the stats1 verb, per the
feature request in #1017. With 'mlr stats1 ... -w {n}', statistics are
computed over a trailing window of up to n records -- per group when -g
is used -- and one output record is emitted per input record, with the
windowed statistics appended to it.

The implementation retains, per grouping key, copies of only the
relevant value fields from the last up-to-n records. On each input
record the group's accumulators are reset and re-fed from the window.
This is O(window size) per record, but is fully generic: it works
uniformly for every stats1 accumulator, including order-sensitive ones
(mode, antimode) and non-invertible ones (percentiles, distinct_count),
and composes with -g, --fr/--fx, and --gr/--gx.

Includes unit tests, regression cases (test/cases/verb-stats1/0020-0025),
and regenerated docs/man/help-text artifacts.

Addresses #1017.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* neaten

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 10:24:41 -04:00
..
overrides merge 2021-11-22 22:43:15 -05:00
src Add sliding-window mode to mlr stats1 via -w {n} (#1017) (#2186) 2026-07-14 10:24:41 -04:00
_config.yml Set theme jekyll-theme-leap-day 2021-11-05 09:41:44 -04:00
build-epub.sh Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
Makefile Publish an epub of the docs on Read the Docs (#1835) (#2166) 2026-07-07 14:55:36 -04:00
mkdocs.yml More AI skill/MCP docs (#2140) 2026-07-04 14:45:29 -04:00
README.md Page-refactor for CSV/JSON troubleshooting (#2128) 2026-07-03 10:19:09 -04:00
regen.sh Remove Miller-5 source/doc/manpage directories, along with C-build files (#731) 2021-11-04 00:45:44 -04:00
requirements.txt trying https://github.com/squidfunk/mkdocs-material/issues/43 2021-11-04 19:05:15 -04:00
retitle Remove Miller-5 source/doc/manpage directories, along with C-build files (#731) 2021-11-04 00:45:44 -04:00