powoGenera: Get list of genera from POWO

View source: R/powoGenera.R

powoGeneraR Documentation

Get list of genera from POWO

Description

It produces a CSV file listing all genera with associated number of accepted species and geographical distribution for any angiosperm family at Plants of the World Online (POWO).

Usage

powoGenera(family, uri, genus = NULL, country = 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.

genus

Either one genus name or a vector of multiple genera that are present in POWO. If any genus name is not provided, then the function will search all accepted genera known for the target family.

country

Either one country name or a vector of multiple countries. If country names are provided, then the function will return only the genera that are native to such countries, according to POWO.

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_powoGenera 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 and saves the output on disk.

Author(s)

Debora Zuanny & Domingos Cardoso

See Also

megaGen

toptenGen

powoSpecies

POWOcodes

Examples

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

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

powoGenera(powocodes$family, powocodes$uri,
           verbose = TRUE,
           save = TRUE,
           dir = "results_powoGenera/",
           filename = "Fabaceae_Lecythidaceae")

powoGenera(powocodes$family, powocodes$uri,
           genus = c("Luetzelburgia", "Bertholletia"),
           country = c("Argentina", "Brazil", "French Guiana"),
           verbose = TRUE,
           save = TRUE,
           dir = "results_powoGenera/",
           filename = "Fabaceae_Lecythidaceae")

## Searching for all genera and associated species number and
## global distribution in any or all angiosperm families,
## by using the URI addresses within the POWOcodes data file

data(POWOcodes)

powoGenera(POWOcodes$family, POWOcodes$uri,
           verbose = TRUE,
           save = TRUE,
           dir = "results_powoGenera/",
           filename = "all_angiosperm_genera")

## End(Not run)


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