FuzzyMatch: Find Close Matches in a tree and dataset

Description Usage Arguments Value Author(s) References Examples

View source: R/FuzzyMatch.R

Description

When assembling data from different sources typos can sometimes cause a loss of perfect matches between trees and datasets. This function helps you find these close matches that can be hand curated to keep as many species as possible in your analysis.

Usage

1
FuzzyMatch(tree, data, max.dist)

Arguments

tree

a phylogenetic tree of the class "phylo".

data

character vector with the names from your dataset.

max.dist

This is the maximum number of characters that can differ between your tree and data and still be recognized as a close match.

Value

A dataframe with the following rows:

Name in data
Name in tree
Number of differences

Author(s)

Heath Blackmon

References

http://coleoguy.github.io/

Examples

1
2
3
4
data(hym.tree)
names <- c("Pepsis_elegans", "Plagiolepis_alluaudi", "Pheidele_lucreti",
           "Meliturgula_scriptifronsi", "Andrena_afimbriat")
FuzzyMatch(tree = hym.tree, data = names, max.dist=3)

Example output

sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Found 3 names that were close but imperfect matches
               name.in.data             name.in.tree differences
1          Pheidele_lucreti        Pheidole_lucretii           2
2 Meliturgula_scriptifronsi Meliturgula_scriptifrons           1
3         Andrena_afimbriat       Andrena_afimbriata           1

evobiR documentation built on May 2, 2019, 5:40 a.m.