Learn R Programming

algaeClassify (version 2.0.4)

bestmatch: fuzzy partial matching between a scientific name and a list of possible matches

Description

fuzzy partial matching between a scientific name and a list of possible matches

Usage

bestmatch(enteredName, possibleNames, maxErr = 3, trunc = TRUE)

Value

a character string with the best match, or 'multiplePartialMatches'

Arguments

enteredName

Character string with name to check

possibleNames

Character vector of possible matches

maxErr

maximum number of different bits allowed for a partial match

trunc

TRUE/FALSE. if true and no match, retry with last three letters truncated

Examples

Run this code
possibleMatches=c('Viburnum edule','Viburnum acerifolia')
bestmatch(enteredName='Viburnum edulus',possibleNames=possibleMatches)

Run the code above in your browser using DataLab