This is simply a wrapper around match
or \%in\%
for
a specific data.frame
of values.
equivalentName(value, df, column, multi = FALSE, searchColumn = NULL)
equivalentNameColumn(value, df, column, multi = FALSE, searchColumn = NULL)
Vector of values to match in df
.
A data.frame
where every row is a set of equivalent names.
A character string or numeric of length 1, indicating the column
in df
to return names from.
Logical. If TRUE
, then all matches will be returned.
Default FALSE
for backwards compatibility.
This may result in more elements than were in value
,
as each value
may be matched by more than one entry,
returning more than one result each from column
.
If a species is found in the df
, but there is no corresponding
value in column
, it will return NA
.
Optionally, provide the name of a column in df
that results
must be found in. The return value will still be from column