powered by
Creates bins given breaks
create_bins(x, breaks, method = "cuts")
X is a numeric vector which is to be discretized
Breaks are the breaks for the vector X to be broken at. This excludes endpoints
the approach to bin the variable, can either be cuts or hinge.
A vector same length as X is returned with the numeric discretization
create_breaks
# NOT RUN { create_bins(1:10, c(3, 5)) # }
Run the code above in your browser using DataLab