Hi there!
I'd like to ask for a feature that would keep the original labels generated by the internal cut function in discretize, instead of "bin1", bin2", etc. Perhaps adding an argument keep_cut_labels = TRUE, for example.
Minimal Reproducible Example:
Current Behaviour:
library(modeldata)
data(biomass)
biomass_tr <- biomass[biomass$dataset == "Training",]
biomass_te <- biomass[biomass$dataset == "Testing",]
rec <- recipe(HHV ~ carbon,
data = biomass_tr) %>%
step_discretize(carbon)
rec <- prep(rec, biomass_tr)
binned_te <- bake(rec, biomass_te)
table(binned_te$carbon)

Expected behaviour:
breaks <- quantile(biomass_tr$carbon, probs = seq(0, 1, length = 4 + 1))
table(cut(biomass_te$carbon, breaks = breaks))

Hi there!
I'd like to ask for a feature that would keep the original labels generated by the internal
cutfunction in discretize, instead of "bin1", bin2", etc. Perhaps adding an argumentkeep_cut_labels = TRUE, for example.Minimal Reproducible Example:
Current Behaviour:
Expected behaviour: