R/utils.R

# If a is null, then b
if_null <- function(a, b) {
  if (!is.null(a)) {
    a
  } else {
    b
  }
}

str_replace <- function(x, pattern, replacement) {
  gsub(pattern, replacement, x)
}

Try the packagedocs package in your browser

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

packagedocs documentation built on May 2, 2019, 4:18 a.m.