This is a wrapper around the cut() function.
Arguments
- x
A numeric vector to be passed through.
- breaks
Break points for the categories. Both the top and bottom breaks must be provided.
Value
Returns a character vector.
Examples
categorise(seq(10),breaks=c(0,3,10))
#> [1] "[0,3]" "[0,3]" "[0,3]" "(3,10]" "(3,10]" "(3,10]" "(3,10]" "(3,10]"
#> [9] "(3,10]" "(3,10]"