I wonder if could be possible to mutate variables inside my recipe taking a list of variables and imputing a fixed value (-12345) when NA is found.
No success so far.
my_list <- c("impute1", "impute2", "impute3")
recipe <-
recipes::recipe(target ~ ., data = data_train) %>%
recipes::step_naomit(everything(), skip = TRUE) %>%
recipes::step_rm(c(v1, v2, id, id2 )) %>%
recipes::step_mutate_at(my_list, if_else(is.na(.), -12345, . ))
Error in step_mutate_at_new(terms = ellipse_check(...), fn = fn, trained = trained, : argument "fn" is missing, with no default