View source: R/convenience-functions.R
bin_numeric_variable | R Documentation |
A wrapper around dplyr::ntile()
to bin a numeric feature
into a discrete one.
bin_numeric_variable(df, num_variable, discr_variable, n_bins)
df |
A data.frame containing at least the numeric variable specified in |
num_variable |
Character value. The name of the numeric variable that you want to convert. |
discr_variable |
Character value. The name the new discrete variable wil have. |
n_bins |
Numeric value. The number of bins you want to distribute the
values of |
The data.frame specified in data
with the additional discrete variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.