This is simply a wrapper around match
or %in%
for
a specific data.frame
of values.
equivalentName(value, df, column, multi = FALSE, searchColumn = NULL)
Arguments
value |
Vector of values to match in df . |
df |
A data.frame where every row is a set of equivalent names. |
column |
A character string or numeric of length 1, indicating the column
in df to return names from. |
multi |
Logical. If TRUE , then all matches will be returned. Default
is 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 |
searchColumn |
Optionally, provide the name of a column in df that results
must be found in. The return value will still be from column |