dataPrep <- function(data = train,
allowNAInData = FALSE,
recipe = rec) {
trainSet <- recipe %>%
recipes::bake(data)
if (allowNAInData == FALSE) {
trainSet <- trainSet %>%
dplyr::select_if(all(!is.na(x)))
}
return(trainSet)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.