forked from tidyverse/dplyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update indexing for dplyr_cummean (tidyverse#5287) (tidyverse#5288)
* Update indexing for dplyr_cummean (tidyverse#5287) * Add unit test for cummean Check that cummean is consistent with the alternate method of cummean(x) = cumsum(x) / seq_along(x). Make sure future changes don't break the relationship above. See also: tidyverse#5287 * Update unit test for cummean Add inline comments with exact values we expect to see, so in the future it is easier to compare expected vs actual results. * Update unit test for cummean Add another check that we get expected values, independent of cumsum and seq_along (in case of other bugs). That is, cummean(1:5) = [1, 1.5, 2, 2.5, 3]. * Not assuming there is at least one element, +test * + NEWS Co-authored-by: Romain Francois <[email protected]>
- Loading branch information
1 parent
f089919
commit 76f61d0
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters