Calculate the value of x based on the cut points and corresponding segment values
Source:R/cut_score.R
cut_value.Rd
Calculate the value of x based on the cut points and corresponding segment values
Arguments
- x
A numeric value.
- breaks
A numeric vector indicating the cut points, left open and right closed.
- values
A vector indicating the return values of each segment, its length must be equal to
breaks
+ 1.- right
Logical, indicating if the intervals should be closed on the right (and open on the left) or vice versa.
- if_na
A value of the same type as
values
used to determine the value returned when x is NA.