Skip to content

Commit 5f73eb1

Browse files
Apply suggestions from Michael's code review
Co-authored-by: Michael Chirico <[email protected]>
1 parent c3950b2 commit 5f73eb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
### BREAKING CHANGE
88

9-
1. Rolling functions `frollmean` and `frollsum` used to treat `Inf` and `-Inf` as `NA` when using default `algo="fast"`. It has been changed now and infinite values are not treated as `NA` anymore. If your input into those functions has `Inf` or `-Inf` then you will be affected by this change. As a result, argument that controls behavior of `NA`s has been renamed from `hasNA` to `has.nf` (_has non-finite_), as of 1.18.0 both will work, former with a warning.
9+
1. Rolling functions `frollmean` and `frollsum` distinguish `Inf`/`-Inf` from `NA` to match the same rules as base R when `algo="fast"` (previously they were considered the same). If your input into those functions has `Inf` or `-Inf` then you will be affected by this change. As a result, the argument that controls the handling of `NA`s has been renamed from `hasNA` to `has.nf` (_has non-finite_). `hasNA` continues to work with a warning, for now.
1010
```r
1111
## before
1212
frollsum(c(1,2,3,Inf,5,6), 2)
1313
#[1] NA 3 5 NA NA 11
1414

15-
## 1.18.0
15+
## now
1616
frollsum(c(1,2,3,Inf,5,6), 2)
1717
#[1] NA 3 5 Inf Inf 11
1818

0 commit comments

Comments
 (0)