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

Median aggregation is not computing the right value #2588

Closed
sgratzl opened this issue Aug 2, 2020 · 2 comments
Closed

Median aggregation is not computing the right value #2588

sgratzl opened this issue Aug 2, 2020 · 2 comments
Labels

Comments

@sgratzl
Copy link
Contributor

sgratzl commented Aug 2, 2020

Describe the bug (required)

looking at the aggregation code I notice that the median aggregation function is not computing the correct value:

https://github.com/tannerlinsley/react-table/blob/aa2835766a7a34f70cd6b579628e4f7e820970ab/src/aggregations.js#L52-L68

see also https://en.wikipedia.org/wiki/Median

Provide an example via Codesandbox! (required)
https://codesandbox.io/s/angry-lehmann-kb9vx?file=/src/App.js

Steps To Reproduce (required)
Steps to reproduce the behavior:

  1. Go to 'https://codesandbox.io/s/angry-lehmann-kb9vx?file=/src/App.js
  2. Click on "group by status"
  3. Compare median values of different groups

Expected behavior (Recommended)
I would expect that these two median values are equal

@tannerlinsley
Copy link
Collaborator

My goodness you're right!

@tannerlinsley
Copy link
Collaborator

🎉 This issue has been resolved in version 7.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants