taxlist (version 0.2.4)

match_names: Search matchings between character and taxlist objects

Description

Names provided in a character vector will be compared with names stored in slot taxonNames within an object of class taxlist by using the function stringsim().

Usage

match_names(x, object, ...)

# S4 method for character,character match_names( x, object, UsageID, best = 1, nomatch = TRUE, method = "lcs", cutlevel = NULL, ... )

# S4 method for character,missing match_names(x, best, cutlevel, nomatch = TRUE, ...)

# S4 method for character,taxlist match_names( x, object, show_concepts = FALSE, accepted_only = FALSE, include_author = FALSE, ... )

Arguments

x

A character vector with names to be compared.

object

Either a character vector or a taxlist object containing the taxonomic list for comparison. If missing, the similarity of each name in 'x' will be compared with the rest of the names in the same vector.

...

Further arguments passed among methods.

UsageID

A vector with IDs for single usage names in the compared list. If the IDs are duplicated or not as much as names in 'object', the function retrieves an error message. If missing, this function will number every name anew (see column 'TaxonUsageID' in the output object).

best

Integer value indicating how many matches should be displayed in the output. Matches with the same value of similarity will be considered as one. Note that this argument will be overrode by 'cutlevel'.

nomatch

A logical value indicating wheter names without matches should be included in the output ('nomatch = TRUE') or not ('nomatch = FALSE').

method

Further arguments passed to stringsim().

cutlevel

A numeric value indicating a cut level of similarity, considering as match names with similarities equal or bigger than the cut value. This argument overrides 'best'.

show_concepts

Logical value indicating whether the respective taxon concepts should be displayed in output or not.

accepted_only

Logical value indicating whether only accepted names should be matched or all usage names (including synonyms).

include_author

A logical value indicating whether the author name in object (method for taxlist) should be included in the matching list or not.

Author

Miguel Alvarez kamapu78@gmail.com

See Also

stringsim()

Examples

Run this code
## Names to be compared
species <- c("Cyperus papyrus", "Typha australis", "Luke Skywalker")

## Comparing character vectors
match_names(c("Cyperus paper", "TIE fighter"), species)

## Retrieve taxon usage names
match_names(species, Easplist)

## Display accepted names in output
match_names(x = species, object = Easplist, show_concepts = TRUE)

# Using cut value for similarity
match_names(x = species, object = Easplist, cutlevel = 0.8)

Run the code above in your browser using DataLab