-
Notifications
You must be signed in to change notification settings - Fork 1k
Gforce weighted.mean #5246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gforce weighted.mean #5246
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5246 +/- ##
=======================================
Coverage 99.50% 99.50%
=======================================
Files 77 77
Lines 14639 14645 +6
=======================================
+ Hits 14567 14573 +6
Misses 72 72
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good idea for implementation.
Not enough tests. Add some for NA, maybe NaN as well (both in x and w). Test against fixed values rather than stats function call, especially when object is so tiny. Add test where there is more than one group.
|
This seems to fail on R 3.5 and older |
…h 'invalid first argument'; removing it passed all tests so it wasn't covered.
Closes #3977
As pointed in the issue its faster (at least on my multi-core machine) to double call
gsumdue to #3202 than providing an implementation similar to e.g.gsd/gvar.