You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FREQUENCY() is giving me weird results. I feed in 5 numbers as data, i.e. [ 4, 5, 5, 7, 10 ] and my bins are [ [ 4, 6 ], [ 6, 8 ], [ 8, 10 ], [ 10, 12 ], [ 12, 14 ] ] and I get back [ 1, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0 ].
So with 5 items and with 5 buckets I get 11 values back. This is not how FREQUENCY works in Excel.
Any ideas?
edit: quick fix with lodash (note that if value is same as upper bin value, it will be moved to the next bin):
var frequencies = []
_.each(bins, b => {
var frequency = 0
_.each(values, v => {
if(b[0] <= v && b[1] > v) {
frequency++
}
})
frequencies.push({bin: b, frequency: frequency})
})
The text was updated successfully, but these errors were encountered:
FREQUENCY()
is giving me weird results. I feed in 5 numbers as data, i.e.[ 4, 5, 5, 7, 10 ]
and my bins are[ [ 4, 6 ], [ 6, 8 ], [ 8, 10 ], [ 10, 12 ], [ 12, 14 ] ]
and I get back[ 1, 2, 0, 1, 0, 1, 0, 0, 0, 0, 0 ]
.So with 5 items and with 5 buckets I get 11 values back. This is not how
FREQUENCY
works in Excel.Any ideas?
edit: quick fix with lodash (note that if value is same as upper bin value, it will be moved to the next bin):
The text was updated successfully, but these errors were encountered: