You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -792,6 +792,41 @@ rowwiseDT(
792
792
793
793
41.`tables()`isfasterbydefaultbyexcludingthesizeofcharacterstringsinR's global cache (which may be shared) and excluding the size of list column items (which also may be shared). `mb=` now accepts any function which accepts a `data.table` and returns a higher and better estimate of its size in bytes, albeit more slowly; e.g. `mb = utils::object.size`.
794
794
795
+
42. Multiple improvements has been added to rolling functions. Request came from @gpierard who needed left aligned, adaptive, rolling max, [#5438](https://github.com/Rdatatable/data.table/issues/5438). There was no `frollmax` function yet. Adaptive rolling functions did not have support for `align="left"`. `frollapply` did not support `adaptive=TRUE`. Available alternatives were base R `mapply` or self-join using `max` and grouping `by=.EACHI`. As a follow up of his request, following features has been added:
796
+
- new function `frollmax`, applies `max` over a rolling window.
797
+
- support for `align="left"` for adaptive rolling function.
798
+
- support for `adaptive=TRUE` in `frollapply`.
799
+
- `partial` argument to trim window width to available observations rather than returning `NA` whenever window is not complete.
800
+
801
+
For a comprehensive description about all available features see `?froll` manual.
802
+
803
+
Adaptive `frollmax` has observed to be up to 50 times faster than second fastest solution (data.table self-join using `max` and grouping `by=.EACHI`).
1. `by=.EACHI` when `i` is keyed but `on=` different columns than `i`'skeycouldcreateaninvalidlykeyedresult, [#4603](https://github.com/Rdatatable/data.table/issues/4603) [#4911](https://github.com/Rdatatable/data.table/issues/4911). Thanks to @myoung3 and @adamaltmejd for reporting, and @ColeMiller1 for the PR. An invalid key is where a `data.table` is marked as sorted by the key columns but the data is not sorted by those columns, leading to incorrect results from subsequent queries.
0 commit comments