# NOT RUN {
library(modeldata)
data(biomass)
biomass_tr <- biomass[biomass$dataset == "Training",]
biomass_te <- biomass[biomass$dataset == "Testing",]
rec <- recipe(HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur,
data = biomass_tr)
center_trans <- rec %>%
step_center(carbon, contains("gen"), -hydrogen)
center_obj <- prep(center_trans, training = biomass_tr)
transformed_te <- bake(center_obj, biomass_te)
biomass_te[1:10, names(transformed_te)]
transformed_te
tidy(center_trans, number = 1)
tidy(center_obj, number = 1)
# }
Run the code above in your browser using DataLab