R/fill_na.R

Defines functions fill_na.mcmcr fill_na.mcmcarray fill_na.mcarray

Documented in fill_na.mcarray fill_na.mcmcarray fill_na.mcmcr

#' @export
extras::fill_na

#' @inherit extras::fill_na
#' @inheritParams params
#' @export
fill_na.mcarray <- function(x, value = 0, ...) {
  chk_unused(...)
  x <- unclass(x)
  x <- fill_na(x, value = value)
  set_class(x, "mcarray")
}

#' @inherit extras::fill_na
#' @inheritParams params
#' @export
fill_na.mcmcarray <- function(x, value = 0, ...) {
  chk_unused(...)
  x <- unclass(x)
  x <- fill_na(x, value = value)
  set_class(x, "mcmcarray")
}

#' @inherit extras::fill_na
#' @inheritParams params
#' @export
fill_na.mcmcr <- function(x, value = 0, ...) {
  chk_unused(...)
  x <- lapply(x, fill_na, value = value)
  set_class(x, "mcmcr")
}

Try the mcmcr package in your browser

Any scripts or data that you put into this service are public.

mcmcr documentation built on Sept. 7, 2021, 1:07 a.m.