match_exact: Exact matcher

Description Usage Arguments Examples

View source: R/match_exact.R

Description

Exact matcher

Usage

1
2
3
4
match_exact(x, ref = NULL, against = NULL)

## S3 method for class '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")

sckott/splister documentation built on May 26, 2017, 3:49 a.m.