R/match.R

Defines functions .match.useAsDefault

### =========================================================================
### The match() generic
### -------------------------------------------------------------------------
###
### base::match() doesn't have the ... argument. We add it to the generic
### function defined here. We also set dispatch on the first two args (the
### 'x' and 'table' args) only!

.match.useAsDefault <-
    function(x, table, nomatch=NA_integer_, incomparables=NULL, ...)
        base::match(x, table, nomatch=nomatch, incomparables=incomparables, ...)

setGeneric("match", signature=c("x", "table"),
    function(x, table, nomatch=NA_integer_, incomparables=NULL, ...)
        standardGeneric("match"),
    useAsDefault=.match.useAsDefault
)

setGeneric("%in%", function(x, table) standardGeneric("%in%"))

Try the BiocGenerics package in your browser

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

BiocGenerics documentation built on April 17, 2021, 6:01 p.m.