Exact matcher

match_exact(x, ref = NULL, against = NULL)

# S3 method for character
match_exact(x, ref = NULL, against = NULL)

Arguments

x

Input species list, a character vector

ref

(character) Reference taxon data.frame, or file path

against

(character) What column to match against in data.frame. Ignored if a vector given

Examples

x <- c("Salmo eperlanus Linnaeus, 1758", 'Oncorhynchus clarkii', 'Salmo', 'Oncorhynchus clarkii', 'Salvelinus fontinalis', 'Salvelinus confluentus') y <- system.file("examples", "worms_salmo.csv", package = "splister") dat <- unique(read.csv(y, stringsAsFactors = FALSE)) # get exact matches res <- match_exact(x, ref = dat, against = "scientificName") # then move on to do fuzzy matching match_fuzzy(x, dat, against = "scientificName")
#> <species list> #> Reference: type:data.frame, cols:4, rows:28 #> Against: scientificName #> Taxa: 6 #> Exact Matches: 1 #> Replacements: 0 #> No Exact Matches: 5 #> No Exact or Fuzzy Matches: 0