View source: R/discretizeData.R
discretizeData | R Documentation |
This function discretizes all numerical variables, or only the ones passed in features, into K categories based on their quantiles. Names of categories can optionally be given in knames.
discretizeData(
data,
K = 2,
features = NULL,
knames = NULL,
return_split = FALSE
)
data |
data to discretize. |
K |
numeric, number of categories (default: K = 2). |
features |
vector with variables names or column numbers to discretize. If NULL (default), then all numeric variables are discretized. |
knames |
optional: character vector of the same length than K, containing the ordered names for categories. |
return_split |
if TRUE, then the table with thresholds used to discretize data is also returned. |
Data with discretized variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.