megaGen: Get megadiverse genera from POWO

View source: R/megaGen.R

megaGenR Documentation

Get megadiverse genera from POWO

Description

It produces a CSV file listing all megadiverse genera for any angiosperm family at Plants of the World Online (POWO). A numeric value should define the threshold to be considered a megadiverse genus. Frodin (2004) suggests 500 species as the threshold for a megadiverse genus.

Usage

megaGen(family, uri, thld = NULL,
        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.

thld

A defined threshold of species number for a genus to be considered megadiverse. If no threshold number is provided, the function will consider a value of 500 based on Frodin (2004).

verbose

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

save

Logical, if FALSE, the searched results will not be saved on disk.

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_megaGen 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("Fabaceae", "Lecythidaceae")
powocodes <- cbind(family = fam,
                   data.frame(taxize::get_pow(fam)))

megaGen(powocodes$family, powocodes$uri,
        thld = 500,
        verbose = TRUE,
        save = TRUE,
        dir = "results_megaGen/",
        filename = "Fabaceae_Lecythidaceae")

## Searching for all megadiverse angiosperm genera
## in any or all families, by using the URI addresses
## within the POWOcodes data file

data(POWOcodes)

megaGen(POWOcodes$family, POWOcodes$uri,
        thld = 500,
        verbose = TRUE,
        save = TRUE,
        dir = "results_megaGen/",
        filename = "megadiverse_plant_genera")

## End(Not run)


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