R/if_na_then.R

if_na_then <- function (x, replacement) {
  if (is.na(x)) {
    return(replacement)
  } else {
    return(x)
  }
}
BAAQMD/BY documentation built on March 27, 2021, 5:36 p.m.