Learn R Programming

ldat (version 0.3.3)

match: Value matching

Description

Value matching

Usage

match(x, table, ...)

# S3 method for default match(x, table, ...)

# S3 method for lvec match(x, table, na_incomparable = FALSE, ...)

Arguments

x

lvec of values to be matched

table

vector of values in which to look for matches.

...

optional arguments passed to and from other methods.

na_incomparable

can NA's and NaN's be matched.

Value

Returns a numeric lvec of the same length as x with the corresponding indices of records in table with the same value. When no match in table is found, NA is returned for the corresponding record.