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
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,10 @@
12
12
13
13
4.`as.Date()` method for `IDate` no longer coerces to `double`[#6922](https://github.com/Rdatatable/data.table/issues/6922). Thanks @MichaelChirico for the report and PR. The only effect should be on overly-strict tests that assert `Date` objects have `double` storage, which is not in general true, especially from R 4.5.0.
14
14
15
-
5. 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 or will be added:
15
+
5. 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:
16
16
- new function `frollmax`, applies `max` over a rolling window.
17
17
- support for `align="left"` for adaptive rolling function.
18
18
- support for `adaptive=TRUE` in `frollapply`.
19
-
- better support for non-double data types in `frollapply`.
20
-
- better support for `Inf` and `-Inf` support in `algo="fast"` implementation.
21
19
-`partial` argument to trim window width to available observations rather than returning `NA` whenever window is not complete.
22
20
23
21
For a comprehensive description about all available features see `?froll` manual.
Copy file name to clipboardExpand all lines: inst/tests/froll.Rraw
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1154,10 +1154,13 @@ f = function(x) {
1154
1154
}
1155
1155
#test(6010.106, head(frollapply(1:5, 3, f), 3L), c(NA_real_,NA_real_,1), output=c("frollapplyR: allocating memory.*","frollapply: took.*","frollapplyR: processing.*took.*")) # only head 3 is valid, rest is undefined as REAL is applied on logical type, can return garbage or fail with REAL error
error(_("adaptive rolling function can only process 'x' having equal length of elements, like data.table or data.frame; If you want to call rolling function on list having variable length of elements call it for each field separately"));
329
+
if (xlength(VECTOR_ELT(kl, j))!=inx[0])
330
+
error(_("length of integer vector(s) provided as list to 'n' argument must be equal to number of observations provided in 'x'"));
0 commit comments