knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The main goal of the expowo package is to retrieve information about the diversity and distribution of any plant family as publicly available at the taxonomically verified database Plants of the World Online (POWO).\

The package is intended to efficiently mine the content within the source html pages for any specific genus and family. It can return a comma-separated values (CSV) file with the number of accepted species and country-level distribution for any genus as well as the full checklist of accepted species in any genus or family, their authorship, original publication and global distribution.\

Here in this article, we show how to use the package's function powoSpecies for mining all accepted species for any genus or family of flowering plants.

Setup

expowo is not on CRAN yet but you can install the latest development version from GitHub:

#install.packages("devtools")
devtools::install_github("deborazuanny/expowo")
library(expowo)

Mining all accepted species for any angiosperm family

The function powoSpecies returns a dataframe or saves a CSV file listing all accepted species (including hybrid species or not), their publication, authorship, and global geographic distribution at country or botanical level for any family of flowering plants. The global classification of botanical divisions follows the World Geographical Scheme for Recording Plant Distributions, which is already associated with each taxon's distribution in the POWO.\

The example below shows how to mine all accepted species for a specified vector of families.

library(taxize)
fam <- c("Amborellaceae", "Cabombaceae", "Martyniaceae")
powocodes <- cbind(family = fam,
                   data.frame(taxize::get_pow(fam)))

res <- powoSpecies(powocodes$family, powocodes$uri,
            hybridspp = FALSE,
            verbose = TRUE,
            save = F,
            dir = "results_powoSpecies/",
            filename = "Ambor_Cabom_Martyniaceae_search")
data("POWOcodes")
fam <- c("Amborellaceae", "Cabombaceae", "Martyniaceae")
powocodes <- data.frame(family = fam,
                        uri = POWOcodes$uri[POWOcodes$family %in% fam])

res <- powoSpecies(powocodes$family, powocodes$uri,
                   hybridspp = FALSE,
                   verbose = FALSE,
                   save = FALSE)

knitr::kable(res[-c(8:11)],
             caption = "TABLE 1. A general `powoSpecies` search for mining all 
             accepted species for some specific angiosperm families.")

Mining all accepted species for all angiosperm families

To mine a species checklist for all families of flowering plants, you recommend to load the dataframe-formatted data object called POWOcodes that comes associated with the expowo package. Because the POWOcodes data object already contains the URI addresses for all angiosperms families recognized in the POWO database, you do not need to perform the time-consuming URI search using taxize. \

The example below shows how to mine a global checklist of all accepted species of flowering plants by using the vector of all angiosperm families and associated URI addresses stored in the POWOcodes object.

data(POWOcodes)

powoSpecies(POWOcodes$family, POWOcodes$uri,
            hybridspp = TRUE,
            verbose = TRUE,
            save = TRUE,
            dir = "results_powoSpecies/",
            filename = "all_angiosperm_species")

Narrowing down the powoSpecies search based on a specified country vector

You can also narrow down the species checklist search of any family by focusing on just a particular country or a list of countries. You just need to define a vector of country names in the argument \code{country}. In the example below, note that we have originally searched for the species within the families Amborellaceae, Cabombaceae, and Martyniaceae, but the function returned a smaller species list, because many species in the searched families are not recorded in any of the specified vector of country, i.e. Brazil or Colombia.

library(taxize)
fam <- c("Amborellaceae", "Cabombaceae", "Martyniaceae")
powocodes <- cbind(family = fam,
                   data.frame(taxize::get_pow(fam)))

powoSpecies(powocodes$family, powocodes$uri,
            hybridspp = FALSE,
            country = c("Brazil", "Colombia"),
            verbose = TRUE,
            save = F,
            dir = "results_powoSpecies/",
            filename = "country_constrained_search")
res <- powoSpecies(powocodes$family, powocodes$uri,
                   hybridspp = FALSE,
                   country = c("Brazil", "Colombia"),
                   verbose = FALSE,
                   save = FALSE)

knitr::kable(res[-c(8:11)],
             caption = "TABLE 2. A `powoSpecies` search based on a specified country vector.")

Narrowing down the powoSpecies search based on a specified genus vector

You may want to retrieve information for just one or a list of accepted genera from a given country (or from a list of countries). Just like before, you only need to define a vector of genus names in the argument \code{genus} and a vector of country names in the argument \code{country}. In the example below, see that we have again searched for just the genera Asarum and Bertholletia of the families Aristolochiaceae and Lecythidaceae, but the function only returned the Lecythidaceae genus Bertholletia, because Asarum does not occur in any of the provided list of countries, i.e. Argentina, Brazil or French Guiana.

library(taxize)
fam <- c("Amborellaceae", "Cabombaceae", "Martyniaceae")
powocodes <- cbind(family = fam,
                   data.frame(taxize::get_pow(fam)))

powoSpecies(powocodes$family, powocodes$uri,
            genus = c("Cabomba", "Holoregmia"),
            hybridspp = FALSE,
            country = c("Brazil", "Colombia"),
            verbose = TRUE,
            save = F,
            dir = "results_powoSpecies/",
            filename = "country_constrained_search")
res <- powoSpecies(powocodes$family, powocodes$uri,
                   genus = c("Cabomba", "Holoregmia"),
                   hybridspp = FALSE,
                   country = c("Brazil", "Colombia"),
                   verbose = FALSE,
                   save = FALSE)

knitr::kable(res[-c(8:11)],
             caption = "TABLE 3. A `powoSpecies` search based on specified genus 
             and country vectors.")


deborazuanny/expowo documentation built on June 2, 2022, 8:27 a.m.