R/zzz.R

Defines functions safe_match_default safe_match_3_0 .onLoad

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

  num <<- pillar::num
  set_num_opts <<- pillar::set_num_opts
  char <<- pillar::char
  set_char_opts <<- pillar::set_char_opts
}

safe_match_3_0 <- function(x, table) {
  match(x, table, incomparables = character())
}

safe_match_default <- function(x, table) {
  match(x, table)
}
# nocov end

Try the tibble package in your browser

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

tibble documentation built on March 31, 2023, 11 p.m.