R/control_utils.R

Defines functions modify_list is_none if_null_default

if_null_default <- function(val, default) {
  if (is.null(val)) {
    return(default)
  }
  return(val)
}

is_none <- function(x) {
  identical(x, "none")
}

modify_list <- function(x, y) {
  if (is.null(x)) {
    return(y)
  }
  return(
    utils::modifyList(x, y, keep.null = TRUE)
  )
}

Try the shinyCohortBuilder package in your browser

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

shinyCohortBuilder documentation built on Oct. 14, 2024, 5:08 p.m.