Skip to main content

builtin_cut

Function builtin_cut 

Source
fn builtin_cut(
    args: &[RValue],
    named: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

Bin continuous values into intervals, returning a factor with interval labels.

@param x numeric vector of values to bin @param breaks numeric vector of cut points (must be sorted, length >= 2) @param labels optional character vector of labels (length = length(breaks) - 1) @param include.lowest if TRUE, the lowest break is inclusive on the left @param right if TRUE (default), intervals are (a,b]; if FALSE, [a,b) @return integer vector with factor class and interval-label levels