bucketCount

Syntax

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

Arguments

vector a numeric or temporal vector.

dataRange a pair indicating the data range, which is inclusive for the min and exclusive for the max.

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

includeOutbound an optional boolean value indicating whether to include the bucket below the min of the data range and the bucket beyond the max 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);
[2,2]

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