direct_match: Direct Match Species Names Against Peru Mammals Database

View source: R/pm_direct_match.R

direct_matchR Documentation

Direct Match Species Names Against Peru Mammals Database

Description

Performs direct matching of species names against the peru_mammals database. Matches binomial names (genus + species) and handles special "sp." cases (e.g., "Akodon sp. Ancash"). Peru mammals database does not include infraspecific taxa.

Usage

direct_match(df, target_df = NULL)

Arguments

df

A data frame or tibble containing the species data to be matched. Must include columns: Orig.Genus, Orig.Species, Rank

target_df

A data frame representing the peru_mammals database. Must include columns: genus, species

Details

This function only matches Rank 2 (binomial) names since peru_mammals does not include infraspecific taxa. It handles:

  • Regular binomials: "Panthera onca"

  • Special "sp." cases: "Akodon sp. Ancash", "Oligoryzomys sp. B"

Names at Rank 1 (genus only) are not matched by this function; use genus_match() instead.

Value

A tibble with an additional logical column direct_match indicating whether the name was successfully matched (TRUE) or not (FALSE), plus columns Matched.Genus and Matched.Species for matched records.


perumammals documentation built on Jan. 6, 2026, 5:06 p.m.