R/na_if_null.R

Defines functions na_if_null

na_if_null <- function(x) {
  if (is.null(x)) {
    return(NA);
  } else {
    return(x);
  }
}

Try the limonaid package in your browser

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

limonaid documentation built on June 10, 2025, 9:10 a.m.