Skip to content
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

rework gminmax #5105

Merged
merged 2 commits into from
Aug 20, 2021
Merged

rework gminmax #5105

merged 2 commits into from
Aug 20, 2021

Conversation

mattdowle
Copy link
Member

@mattdowle mattdowle commented Aug 20, 2021

  • folds gmax into gmin becoming gminmax to avoid the duplicated logic so that future maintenance can be in one place
  • reviewed the logic and changed it slightly; e.g. with default na.rm=FALSE, once an NA has occurred in a group, there is no need to fetch the value of the remaining values in that group
  • moved R API outside loops
  • removed the warnings (closes Remove "no non-missing" warning for character min and max? #4999) and it's now type consistent. I don't know why we ever thought it was a good idea to return Inf, it was just to be consistent with base
  • news item with detailed example

There is some overlap with @MichaelChirico's #4445 here which fixes integer64 support in gmin/gmax. I'll merge that next which should be easier as it's now in one gminmax.

Merging so the NEWS item is published in dev and folk can test dev. Everything in dev is still open for discussion and reconsideration before release.

@mattdowle mattdowle added this to the 1.14.1 milestone Aug 20, 2021
@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

Merging #5105 (dc1cfe6) into master (53278d3) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5105      +/-   ##
==========================================
- Coverage   99.54%   99.54%   -0.01%     
==========================================
  Files          76       76              
  Lines       14691    14592      -99     
==========================================
- Hits        14624    14525      -99     
  Misses         67       67              
Impacted Files Coverage Δ
src/gsumm.c 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53278d3...dc1cfe6. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove "no non-missing" warning for character min and max?
2 participants