R/helpers.R

Defines functions ifnull

Documented in ifnull

#' Not in
#'
#' not version of the %in% infix
#'@export

'%not_in%' <- function(x,y){!('%in%'(x,y))}


#' Return default value if expression is null
#'
#' Mimics the us of ISNULL in SQL.
#'
#' @export
ifnull <- function(expr, default){
  ifelse(is.null(expr), default, expr)
}
Beachnad/dbr documentation built on Nov. 6, 2019, 8:07 p.m.