discretize_get_bins | R Documentation |
It takes a data frame and returns another data frame indicating the threshold for each bin (or segment) in order to discretize the variable.
discretize_get_bins(data, n_bins = 5, input = NULL)
data |
Data frame source |
n_bins |
The number of desired bins (or segments) that each variable will have. |
input |
Vector of string containing all the variables that will be processed. If empty it will run for all numerical variables that match the following condition, the number of unique values must be higher than the ones defined at 'n_bins' parameter. NAs values are automatically handled by converting them into another category (more info about it at https://livebook.datascienceheroes.com/data-preparation.html#treating-missing-values-in-numerical-variables). This function must be used with discretize_df. If it is needed a different number of bins per variable, then the function must be called more than once. |
Data frame containing the thresholds or cuts to bin every variable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.