bucket#
- swordfish.function.bucket()#
Return a vector with the same length as the input vector. Each element of the result indicates which bucket each of the elements of the input vector belongs to, based on the bucket classification rules given by dataRange and bucketNum.
- Parameters:
vector (Constant) – A numeric or temporal vector
dataRange (Constant) – A pair indicating the data range, which includes the lower bound and excludes the upper bound.
bucketNum (Constant) – The number of buckets. When dataRange is specified as an INT PAIR, its range must be a multiple of bucketNum.
includeOutbound (Constant, optional) – 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, by default DFLT
- Returns:
A vector with the same length as the input vector.
- Return type: