R/util_empty.R

Defines functions util_empty

Documented in util_empty

#' Test, if values of x are empty, i.e. NA or whitespace characters
#' @param x the vector to test
#' @return a logical vector, same length as x; TRUE, if resp. element in x is
#'         "empty"
util_empty <- function(x) {
  (is.na(x) | trimws(x) == "")
}

Try the dataquieR package in your browser

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

dataquieR documentation built on July 26, 2023, 6:10 p.m.