bucketCount

Syntax

bucketCount(vector, dataRange, bucketNum, [includeOutbound=false])

Arguments

vector is a numeric or temporal vector.

dataRange is a pair indicating the data range, which includes the lower bound and excludes the upper bound.

bucketNum is the number of buckets. The number of elements of the input vector that belong to dataRange must be a multiple of bucketNum.

includeOutbound (optional) is a Boolean value indicating whether to include the bucket below the lower bound of the data range and the bucket beyond the upper bound of the data range. The default value is false.

Details

Accept the same set of parameters as the function bucket and return the count for each bucket.

Examples

bucketCount(9 23 54 36 46 12, 12:54, 2);
// output
[2,2]

bucketCount(9 23 54 36 46 12, 12:54, 2, 1);
// output
[1,2,2,1]