frequency-distribution
Given an array of numbers and range to split, returns frequency of numbers in that range
Install
$ npm install frequency-distribution --save
Usage
; // => { '1': 2, '2': 1, '3': 2, '5': 4 } // => { '1,2': 3, '3,4': 2, '5,6': 4 }
API
array
Type: Array<Number>
required
rangeLength
Type: number
Default: 1
Length of array Items to split and group. For [1,1,2,2,3,4,5]
length 2 becomes [1,1,2,2], [3,4], [5]
License
MIT © Amit Solanki