R/zzz.R

Defines functions .onLoad safe_match_3_0 safe_match_default

.onLoad <- function(libname, pkgname) {
  if (getRversion() == "3.3.0") {
    safe_match <<- safe_match_3_0
  } else {
    safe_match <<- safe_match_default
  }
}

safe_match_3_0 <- function(x, table) {
  # nocov start
  match(x, table, incomparables = character())
  # nocov end
}

safe_match_default <- function(x, table) {
  # nocov start
  match(x, table)
  # nocov end
}
krlmlr/tibble documentation built on Jan. 15, 2020, 7:56 a.m.