R/null_to_default.R

Defines functions null_to_default

Documented in null_to_default

#' Return default value if NULL
#'
#' @param x value to check and return
#' @param d value to return in case x is NULL
#'
null_to_default <-
  function(x, d){
    if ( is.null(x) ){
      d
    }else{
      x
    }
  }
petermeissner/robotstxt documentation built on Oct. 18, 2024, 9:42 a.m.