MATCH | R Documentation |
MATCH
is a generic function for value matching.
MATCH(x, table, nomatch = NA, ...)
## S3 method for class 'times'
MATCH(x, table, nomatch = NA, units = "sec", eps = 1e-10, ...)
x |
an object. |
table |
the values to be matched against. |
nomatch |
the value to be returned in the case when no match is
found. Note that it is coerced to |
units |
See |
eps |
See |
... |
further arguments to be passed to methods. |
MATCH
is a new generic function which aims at providing
the functionality of the non-generic base function match
for arbitrary objects. Currently, there is a default method which
simply calls match
and various methods for time/date
objects.
The MATCH
method for Date
objects coerces the table
to Date
as well (if necessary) and then uses
match(unclass(x), unclass(table), ...
. Similarly, the MATCH
methods for POSIXct
, POSIXlt
, and timeDate
coerce
both x
and table
to POSIXct
and then match the unclassed
objects.
MATCH.times
is used for chron
objects. x
will
match any time in table
less than units
away.
match
MATCH(1:5, 2:3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.