R/zzz.R

Defines functions .onLoad

#nocov start
.onLoad <- function(libname, pkgname) {
    # Use `fastmatch::fmatch` and `fastmatch::%fin%` if it's available
    assign("match",
           if (.has_fastmatch()) fastmatch::fmatch else base::match,
           pos = getNamespace("fipio"))

    assign("%in%",
           if (.has_fastmatch()) fastmatch::`%fin%` else base::`%in%`,
           pos = getNamespace("fipio"))
}
#nocov end

Try the fipio package in your browser

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

fipio documentation built on March 18, 2022, 7:04 p.m.