# NOT RUN {
library(modeldata)
data(okc)
okc_tr <- okc[1:30000,]
okc_te <- okc[30001:30006,]
okc_te$diet[3] <- "cannibalism"
okc_te$diet[4] <- "vampirism"
rec <- recipe(~ diet + location, data = okc_tr)
rec <- rec %>%
step_novel(diet, location)
rec <- prep(rec, training = okc_tr)
processed <- bake(rec, okc_te)
tibble(old = okc_te$diet, new = processed$diet)
tidy(rec, number = 1)
# }
Run the code above in your browser using DataLab