| pm_list_genera | R Documentation |
Summarises the number of species and endemic species per genus. Optionally restricts the output to one or more orders and/or families. Genera with missing values are excluded from the results.
pm_list_genera(order = NULL, family = NULL)
order |
Optional character vector with one or more taxonomic orders
to keep. If |
family |
Optional character vector with one or more families to keep.
If |
The function validates input parameters and warns if invalid order or family names are provided. It also warns if the filters result in an empty dataset.
A tibble with one row per genus and the following columns:
order – taxonomic order.
family – family name.
genus – genus name.
n_species – number of species in the genus.
n_endemic – number of endemic species in the genus.
Returns an empty tibble with the same structure if no records match the specified filters.
# All genera
pm_list_genera()
# Genera within Chiroptera (bats)
pm_list_genera(order = "Chiroptera")
# Multiple orders
pm_list_genera(order = c("Didelphimorphia", "Chiroptera"))
# Genera within a specific family
bat_genera <- pm_list_genera(family = "Phyllostomidae")
# Count total endemic species in a family
sum(bat_genera$n_endemic)
# Combination of filters
pm_list_genera(order = "Chiroptera", family = "Phyllostomidae")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.