R/replace_na_with.R

#' @export
replace_na_with <- function(.x, .fun = mean) {
  .x[is.na(.x)] <- .fun(.x, na.rm = TRUE)
  .x
}
pavel-filatov/featr documentation built on May 12, 2019, 1:29 a.m.