toptenGen: Get top ten most species-rich genera

View source: R/toptenGen.R

toptenGenR Documentation

Get top ten most species-rich genera

Description

It produces a CSV file listing the top ten most diverse genera of any target botanical family of flowering plants at Plants of the World Online (POWO).

Usage

toptenGen(family, uri,
          verbose = TRUE, save = TRUE, dir, filename)

Arguments

family

Either one family name or a vector of multiple families that are present in POWO.

uri

URI address for each family to be searched in POWO.

verbose

Logical, if FALSE, the search results will not be printed in the console in full.

save

Logical, if FALSE, the search results will not be saved.

dir

Pathway to the computer's directory, where the file will be saved provided that the argument save is set up in TRUE. The default is to create a directory named results_toptenGen and the searched results will be saved within a subfolder named by the current date.

filename

Name of the output file to be saved. Default is to create a file entitled output.

Value

Table in .csv format that is saved on disk.

Author(s)

Debora Zuanny & Domingos Cardoso

See Also

POWOcodes

Examples

## Not run: 
library(expowo)
library(taxize)

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

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

## Searching for the top ten most diverse genera
## in any or all flowering plant families, by using
## the URI addresses within the POWOcodes data file

data(POWOcodes)

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

## End(Not run)


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