find the first occurrence of a name in a vector of strings

findOrderedNames(x, orderedNames, exact = TRUE, ignore.case = FALSE)

Arguments

x

character vector in which the name should be found

orderedNames

vector of names that will be queried. This method will go through them one by one and find the first occurrence in the order of the orderedNames provided

exact

should only be exact matches be reported

ignore.case

should casing be ignored

Value

the string that matches the first occurrence in the order of orderedNames. Returns NA if no match is found.

Author

Fabian Mueller