Description Usage Arguments Value
View source: R/join_consolidate_categories_operator.R
Categorical variable consolidation operator is a data frame, mapping some category levels to 'other'. Read operator from disk, as portable summary of 'train' reference. Given a new data frame with initial categorical variable, join the operator to construct consolidated categorical variable.
1 2 3 4 5 6 7 8 | join_consolidate_categories_operator(
filename_operator,
df,
varname_cat,
varname_suffix_consol = "consol",
value_consol,
varname_suffix_indic_other = "indic_other"
)
|
filename_operator |
Filename of saved categorical variable consolidation operator. |
df |
A data frame, with categorical variable to be consolidated. |
varname_cat |
Character name of a categorical variable. |
varname_suffix_consol |
Character suffix for categorical variable's consolidated version (contained in operator). |
value_consol |
Value which constitutes the newly consolidated 'other' category. |
varname_suffix_indic_other |
Character suffix for categorical variable's binary 'is other' version (contained in operator). |
Modified version of input data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.