Hello all,
Attempting to utilize the recipe package to pre-process some data, below is the code.
rec_obj <- recipe(Churn.Value ~ ., data = train_tbl) %>%
step_discretize(Tenure.Months, options = list(cuts = 6)) %>%
step_log(all_nominal(), -all_outcomes()) %>%
step_dummy(all_predictors(), -all_outcomes()) %>%
step_center(all_predictors(), -all_outcomes()) %>%
step_scale(all_predictors(), -all_outcomes()) %>%
prep(data = train_tbl)
Receiving an error message that states: "Error: All columns selected for the step should be numeric"
From my understanding, the step_dummy function should encode categorical data into numerical data, which is why I'm confused about receiving this error.
Please correct me if I'm wrong, and thanks in advance.