# NOT RUN {
library(modeldata)
data(okc)
rec <-
recipe(~ diet + location, data = okc) %>%
step_unknown(diet, new_level = "unknown diet") %>%
step_unknown(location, new_level = "unknown location") %>%
prep()
table(bake(rec, new_data = NULL) %>% pull(diet),
okc %>% pull(diet),
useNA = "always") %>%
as.data.frame() %>%
dplyr::filter(Freq > 0)
tidy(rec, number = 1)
# }
Run the code above in your browser using DataLab