select_species {florabr}R Documentation

Selection of species based on its characteristics and distribution

Description

select_species allows filter species based on its characteristics and distribution available in Brazilian Flora 2020

Usage

select_species(data,
                      include_subspecies = FALSE, include_variety = FALSE,
                      Kingdom = "Plantae", Group = "All", Subgroup = "All",
                      Family = "All", Genus = "All",
                      LifeForm = "All", filter_LifeForm = "in",
                      Habitat = "All", filter_Habitat = "in",
                      Biome = "All", filter_Biome = "in",
                      State = "All", filter_State = "in",
                      VegetationType = "All", filter_Vegetation = "in",
                      Endemism = "All", Origin = "All",
                      TaxonomicStatus = "Accepted",
                      NomenclaturalStatus = "All")

Arguments

data

(data.frame) the data.frame imported with the load_florabr function.

include_subspecies

(logical) include subspecies? Default = FALSE

include_variety

(logical) include varieties of the species? Default = FALSE

Kingdom

(character) The Kingdom for filtering the dataset. It can be "Plantae" or "Fungi". Default = "Plantae". To include both, use c("Plantae", "Fungi")

Group

(character) The groups for filtering the datasets. It can be "Fungi", "Angiosperms", "Gymnosperms", "Ferns and Lycophytes", "Bryophytes" and "Algae". To use more than one group, put the available items in a vector, for example: Group = c(Angiosperms", "Gymnosperms"). Default = "All".

Subgroup

(character) The subgroups for filtering the dataset. Only available if the Group is "Fungi" or "Bryophytes". For Fungi, it can be "stricto sensu" or "lato sensu". For Bryophytes, it can be "Mosses", "Hornworts" and "Liverworts" . To use more than one group, put the available items in a vector, for example: Subgroup = c("Mosses", "Hornworts"). Default = "All".

Family

(character) The families for filtering the dataset. It can be included more than one Family. Default = "All".

Genus

(character) The genus for filtering the dataset. It can be included more than one Genus. Default = "All".

LifeForm

(character) The life forms for filtering the dataset. It can be included more than one LifeForm. Default = "All"

filter_LifeForm

(character) The type of filtering for life forms. It can be "in", "only", "not_in" and "and". See details for more about this argument.

Habitat

(character) The life habitat for filtering the dataset. It can be included more than one habitat. Default = "All"

filter_Habitat

(character) The type of filtering for habitat. It can be "in", "only", "not_in" and "and". See details for more about this argument.

Biome

(character) The biomes for filtering the dataset. It can be included more than one biome. Default = "All"

filter_Biome

(character) The type of filtering for biome. It can be "in", "only", "not_in" and "and". See details for more about this argument.

State

(character) The States for filtering the dataset. It can be included more than one state. Default = "All".

filter_State

(character) The type of filtering for state. It can be "in", "only", "not_in" and "and". See Details for more about this argument.

VegetationType

(character) The vegetation types for filtering the dataset. It can be included more than one vegetation type. Default = "All".

filter_Vegetation

(character) The type of filtering for vegetation type. It can be "in", "only", "not_in" and "and". See details for more about this argument.

Endemism

(character) The endemism (endemic or non-endemic to Brazil) for filtering the dataset. It can be "All", "Endemic" or "Non-endemic". Default = "All".

Origin

(character) The origin for filtering the dataset. It can be "All", "Native", "Cultivated" and "Naturalized". Default = "All".

TaxonomicStatus

(character) The taxonomic status for filtering the dataset. It can be "All", "Accepted" or "Synonym". Default = "Accepted".

NomenclaturalStatus

(character) The nomenclatural status for filtering the dataset. Default = "Accepted"

Details

It's possible to choose 4 ways to filter by lifeform, by habitat, by biome, by state and by vegetation type: "in": selects species that have any occurrence of the determined values. It allows multiple matches. For example, if Biome = c("Amazon", Cerrado" and filter_Biome = "in", it will select all species that occur in the Amazon and Cerrado, some of which may also occur in other biomes.

"only": selects species that have only occurrence of the determined values. It allows only single matches. For example, if Biome = c("Amazon", "Cerrado") and filter_Biome = "only", it will select all species that occur exclusively in both the Amazon and Cerrado biomes, without any occurrences in other biomes.

"not_in": selects species that don't have occurrence of the determined values. It allows single and multiple matches. For example, if Biome = c("Amazon", "Cerrado") and filter_Biome = "not_in", it will select all species without occurrences in the Amazon and Cerrado biomes.

"and": selects species that have occurrence in all determined values. It allows single and multiple matches. For example, if Biome = c("Amazon", "Cerrado") and filter_Biome = "and", it will select all species that occurs only in both the Amazon and Cerrado biomes, including species that occurs in other biomes too.

To get the complete list of arguments available for Family, Genus, LifeForm, Habitat, Biome, State, and NomenclaturalStatus, use the function get_attributes

Value

A new dataframe with the filtered species.

References

Brazilian Flora 2020. Jardim Botânico do Rio de Janeiro. Available at: http://floradobrasil.jbrj.gov.br/

Examples

data("bf_data") #Load Brazilian Flora data
#'Select endemic and native species of trees with disjunct occurrence in
# Atlantic Forest and Amazon
am_af_only <- select_species(data = bf_data,
                             include_subspecies = FALSE,
                             include_variety = FALSE,
                             Kingdom = "Plantae",
                             Group = "All", Subgroup = "All",
                             Family = "All", Genus = "All",
                             LifeForm = "Tree", filter_LifeForm = "only",
                             Habitat = "All", filter_Habitat = "in",
                             Biome = c("Atlantic_Forest","Amazon"),
                             filter_Biome = "only",
                             State = "All", filter_State = "and",
                             VegetationType = "All",
                             filter_Vegetation = "in",
                             Endemism = "Endemic", Origin = "Native",
                             TaxonomicStatus = "All",
                             NomenclaturalStatus = "All")

[Package florabr version 1.1.0 Index]