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
frollapply rewritten, by.column=F, parallel, any type (#7272)
* frollmax PRs 2:10
* frollmax PR as potentially complete
* recoded frollapply but not split
* address issues spot by lintr
* fix codecov
* try possibly a fix for codecov bug?
* codecov runs older R where is.atomic(NULL) was true, this should fix
* codecov last item
* add parallel to suggests
* types.Rraw causes codecov to hang, try no parallel
* manual codecov confirmation for nocov exceptions
* disabling openmp did not help, still stuck
* improve comments
* use new argument name N
* fix codecov, temporary workaround
* handle interrupts nicely
* move interrupt handler just after child processes are created
* duplicate error/warn templates for easier translation
* wrap messages with gettext
* frollapply test
* rm perf test
* minor doc edits
---------
Co-authored-by: Toby Dylan Hocking <[email protected]>
Co-authored-by: Toby Dylan Hocking <[email protected]>
Copy file name to clipboardExpand all lines: NEWS.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,18 @@
20
20
frollsum(c(1,2,3,Inf,5,6), 2)
21
21
#[1] NA 3 5 Inf Inf 11
22
22
23
+
4.`frollapply`resultisnotcoercedtonumericanymore.Users' code could possibly break if it depends on forced coercion of input/output to numeric type.
24
+
```r
25
+
## before
26
+
frollapply(c(F,T,F,F,F,T), 2, any)
27
+
#[1] NA 1 1 0 0 1
28
+
29
+
## now
30
+
frollapply(c(F,T,F,F,F,T), 2, any)
31
+
#[1] NA TRUE TRUE FALSE FALSE TRUE
32
+
```
33
+
Additionally argument names in `frollapply` has been renamed from `x` to `X` and `n` to `N` to avoid conflicts with common argument names that may be passed to `...`, aligning to base R API of `lapply`. `x` and `n` continue to work with a warning, for now.
34
+
23
35
### NOTICE OF INTENDED FUTURE POTENTIAL BREAKING CHANGES
24
36
25
37
1. `data.table(x=1, <expr>)`, where `<expr>` is an expression resulting in a 1-column matrix without column names, will eventually have names `x` and `V2`, not `x` and `V1`, consistent with `data.table(x=1, <expr>)` where `<expr>` results in an atomic vector, for example `data.table(x=1, cbind(1))` and `data.table(x=1, 1)` will both have columns named `x` and `V2`. In this release, the matrix case continues to be named `V1`, but the new behavior can be activated by setting `options(datatable.old.matrix.autoname)` to `FALSE`. See point 5 under Bug Fixes for more context; this change will provide more internal consistency as well as more consistency with `data.frame()`.
@@ -157,6 +169,47 @@
157
169
158
170
As of now, adaptive rolling max has no _on-line_ implementation (`algo="fast"`), it uses a naive approach (`algo="exact"`). Therefore further speed up is still possible if `algo="fast"` gets implemented.
159
171
172
+
17. Function `frollapply` has been completely rewritten. Thanks to @jangorecki for implementation. Be sure to read `frollapply` manual before using the function. There are following changes:
173
+
- all basic types are now supported on input/output, not only double. Users'codecouldpossiblybreakifitdependsonforcedcoercionofinput/outputtodoubletype.
1.`fread()`nolongerwarnsoncertainsystemsonR4.5.0+wherethefileownercan't be resolved, [#6918](https://github.com/Rdatatable/data.table/issues/6918). Thanks @ProfFancyPants for the report and PR.
NULL# nocov ## call to make.roll.names is excluded by is.list(ans) condition before calling it, it will be relevant for !by.column in next PR
106
+
stopf("internal error: make.roll.names call should have been escaped in frollapply during 'unpack atomic input'") # nocov ## frollapply(data.frame(x=1:5), rep(2,5), dim, by.column=FALSE, give.names=TRUE, adaptive=TRUE)
97
107
}
98
108
}
99
109
if (!is.null(ans) && length(ans) !=x.len*n.len)
100
110
stopf("internal error: make.roll.names generated names of wrong length") ## nocov
0 commit comments