.factorize_variable | R Documentation |
This function factorizes a numeric variable in a data frame based on a specified variant function and optional breaks.
.factorize_variable(df, weight_column, variant_fun, breaks = NULL)
df |
A data frame containing the variable to be factorized. |
weight_column |
A string specifying the name of the column in the data frame that contains the variable to be factorized. |
variant_fun |
A function that will be applied to the variable for factorization. |
breaks |
An optional numeric vector specifying the breakpoints for cutting the variable, if applicable. |
A factor or numeric vector representing the factorized variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.