8
I want to cut my data using defined breaks in cut():
x = c(-10:10)
cut(x, c(-2,4,6,7))
[1] <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> (-2,4] (-2,4] (-2,4] (-2,4] (-2,4] (-2,4] (4,6] (4,6] (6,7] <NA> <NA>
[21] <NA>
Levels: (-2,4] (4,6] (6,7]
However, I also want to obtain the levels (minimum:-2] and (7:maximum]. In the function recode() of the car-package one can use "lo:". Is there a similar thing available for cut?