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 toptenGen for mining the top ten most species rich genera for any 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 the top ten richest genera for any angiosperm family

The function toptenGen is relatively similar to the megaGen, but instead of using any specific threshold, it saves a CSV file listing the top ten most biodiverse genera of any target angiosperm family, and their associated number of accepted species.

library(taxize)
fam <- c("Bignoniaceae", "Lecythidaceae", "Sapotaceae")
powocodes <- cbind(family = fam,
                   data.frame(taxize::get_pow(fam)))

toptenGen(powocodes$family, powocodes$uri,
          verbose = TRUE,
          save = TRUE,
          dir = "results_toptenGen/",
          filename = "Bigno_Lecyt_Sapotaceae_search")
data("POWOcodes")
fam <- c("Bignoniaceae", "Lecythidaceae", "Sapotaceae")
powocodes <- data.frame(family = fam,
                        uri = POWOcodes$uri[POWOcodes$family %in% fam])

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

knitr::kable(res,
             caption = "TABLE 1. A general `toptenGen` search to mining the top 
             ten most species rich genera for some specific angiosperm families.")

Mining the top ten richest genera accross all angiosperm families

To mine a global checklist of the top ten species-richest genera for all families of flowering plants, including their associated species number, 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 all top ten most species-rich genera of flowering plants by using the vector of all angiosperm families and associated URI addresses stored in the POWOcodes object.

data(POWOcodes)

toptenGen(POWOcodes$family, POWOcodes$uri,
          verbose = TRUE,
          save = TRUE,
          dir = "results_toptenGen/",
          filename = "all_toptenrichest_angiosperm_genera")


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