R/hasNames.R

Defines functions hasNames

# Returns TRUE or FALSE (only) and accepts either strings or
# character vectors in nom1 and ...
hasNames <- function(x, nom1, ...) {
  if (is.null(names(x))) {
    return(FALSE)
  }
  if (missing(..1)) {
    return(all(hasName(x, nom1)))
  }
  hasNames(x, nom1) && hasNames(x, ...)
}
HughParsonage/dhhs documentation built on Dec. 17, 2021, 11:22 p.m.