R/clean_sink.R

Defines functions clean_sink

Documented in clean_sink

#' Puts together a bunch of common 'recipe' steps used in ML and other contexts
#'
#' @details Not used in EAS code
#'

#' @export


clean_sink <- function(df) {
  require("dplyr")
  step_meanimpute(all_numeric(), -all_outcomes()) %>%
      step_knnimpute(all_nominal()) %>%
    step_center(all_numeric(), -all_outcomes()) %>%
    step_scale(all_numeric(),
    -all_outcomes()) %>%
    step_other(all_nominal())
}
rethinkpriorities/rp-r-package documentation built on Jan. 7, 2023, 10:11 p.m.