tests/testthat/helper-utils.R

#' A copy of utils::hasName()
#'
#' utils::hasName() exists since R 3.4 so checks with older R versions fail. An
#' alternative solution is to use the backports package, but seems an overkill
#' at this stage -- as this tiny code is all we need.
#' @noRd
has_name <- function(x, name) {
  match(name, names(x), nomatch = 0L) > 0L
}

Try the r2dii.analysis package in your browser

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

r2dii.analysis documentation built on Oct. 23, 2023, 5:08 p.m.