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 powoGenera
for
mining all accepted genera for any family of flowering plants.
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)
The function powoGenera
returns a dataframe or saves a CSV file listing all
genera with associated number of accepted species and their global geographic
distribution at country or botanical level. 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.
library(taxize) fam <- c("Aristolochiaceae", "Begoniaceae", "Martyniaceae") powocodes <- cbind(family = fam, data.frame(taxize::get_pow(fam))) powoGenera(powocodes$family, powocodes$uri, verbose = FALSE, save = TRUE, dir = "results_powoGenera/", filename = "Arist_Begon_Martyniaceae_search")
data("POWOcodes") fam <- c("Aristolochiaceae", "Begoniaceae", "Martyniaceae") powocodes <- data.frame(family = fam, uri = POWOcodes$uri[POWOcodes$family %in% fam]) res <- powoGenera(powocodes$family, powocodes$uri, verbose = FALSE, save = FALSE) knitr::kable(res[-c(7:10)], caption = "TABLE 1. A general `powoGenera` search for mining all accepted genera for some specific angiosperm families.")
To mine a global genus checklist with associated species number and distribution
for all families of flowering plants, we 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 genera of
flowering plants by using the vector of all angiosperm families and associated URI
addresses stored in the POWOcodes
object.
data(POWOcodes) powoGenera(POWOcodes$family, POWOcodes$uri, verbose = TRUE, save = TRUE, dir = "results_powoGenera/", filename = "all_angiosperm_genera")
powoGenera
search based on a specified country vectorYou can also narrow down the search for all accepted genera of any family so as to focus 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, see that we have originally searched for the genera within the families Aristolochiaceae, Lecythidaceae, Fagaceae, and Dipterocarpaceae, but the function only returned a list of genera of Aristolochiaceae and Lecythidaceae, because the remaining families do not have any genera recorded in the list of countries of interest, i.e. Argentina, Brazil or French Guiana.
library(taxize) fam <- c("Aristolochiaceae", "Dipterocarpaceae", "Fagaceae", "Lecythidaceae") powocodes <- cbind(family = fam, data.frame(taxize::get_pow(fam))) powoGenera(powocodes$family, powocodes$uri, country = c("Argentina", "Brazil", "French Guiana"), verbose = FALSE, save = TRUE, dir = "results_powoGenera/", filename = "country_constrained_search")
fam <- c("Aristolochiaceae", "Dipterocarpaceae", "Fagaceae", "Lecythidaceae") powocodes <- data.frame(family = fam, uri = POWOcodes$uri[POWOcodes$family %in% fam]) res <- powoGenera(powocodes$family, powocodes$uri, country = c("Argentina", "Brazil", "French Guiana"), verbose = FALSE, save = FALSE) knitr::kable(res[-c(7:10)], caption = "TABLE 2. A `powoGenera` search based on a specified country vector.")
powoGenera
search based on a specified genus vectorYou 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("Aristolochiaceae", "Lecythidaceae") powocodes <- cbind(family = fam, data.frame(taxize::get_pow(fam))) powoGenera(powocodes$family, powocodes$uri, genus = c("Asarum", "Bertholletia"), country = c("Argentina", "Brazil", "French Guiana"), verbose = TRUE, save = TRUE, dir = "results_powoGenera/", filename = "genus_country_constrained_search")
res <- powoGenera(powocodes$family[c(1,4)], powocodes$uri[c(1,4)], genus = c("Asarum", "Bertholletia"), country = c("Argentina", "Brazil", "French Guiana"), verbose = TRUE, save = FALSE) knitr::kable(res[-c(7:10)], caption = "TABLE 3. A `powoGenera` search based on specified genus and country vectors.")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.