knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(ethnobotanyR)
library(knitr)
library(magrittr)
library(Taxonstand)

knitr::write_bib(c(.packages(), 
                   "ethnobotanyR",
                   "knitr",
                   "magrittr",
                    "Taxonstand"), file = "references/tax_packages.bib")

This guide offers a walk through of some useful tools for generating complete lists of taxonomic species names for ethnobotany using the ethnobotanyR package [@R-ethnobotanyR] and the against the TPL database [@R-Taxonstand] in the R programming language [@R-base].

Getting Species names right

A large part of the work of ethnobotany is identification of species. Plant species names change all the time. As botanists learn more about the diversity of plant life the taxonomic record becomes more clear and different species groups are often split or merged. These changes are most accurately, and most timely, displayed on The Plant List (TPL) maintained by the Missouri Botanical Garden.

Among the many other functions, the R package Taxonstand can cross-check .csv based lists of species names against the TPL database [@R-Taxonstand]. Below is an example of the functionality of the package using just the species names Full.name in Taxonstand's bryophytes data. Here we use the magrittr pipe to simplify the arguments [@R-magrittr].

data(bryophytes)

 bryophytes_short <- bryophytes %>% 
  head(6)

knitr::kable(bryophytes_short$Full.name, caption = "First six rows of Taxonstand's bryophytes species list")

As an example we can run the TPL function on just the species names Full.name in Taxonstand's bryophytes data, i.e. Taxonstand::TPL(bryophytes$Full.name).^[Note that the funtion requires an active link to The Plant List, which is a massive database that is occasionally offline.]. Here we show just the first six rows, using dplyr [@R-dplyr] and head, to ease the processing speed [@R-base].

corrected_bryophytes_data <- Taxonstand::TPL(bryophytes_short$Full.name)

selected_corrected_data <- dplyr::select(corrected_bryophytes_data, New.Genus, New.Species, New.Authority)

knitr::kable(selected_corrected_data, caption = "First six rows of corrections of Taxonstand's bryophytes species list with Genus species and authority")

Generated with knitr [@R-knitr]

References



CWWhitney/ethnobotanyR documentation built on May 1, 2023, 10:13 a.m.