R/discretize_variable.R
discretize_variable.Rd
Converts a data.table column from continuous to a discrete factor
data.table
discretize_variable(data, variable, num_cats, breakpoints = NULL)
data.table, containing the column to change
character, the name of the column to change
character
integer, the number of bins to generate
integer
numeric vector, the breakpoints to use. If NULL, these will be quantiles.
numeric vector
the updated data.table, modified in place