Load Flora e Funga do Brasil database

load_florabr(data_dir, data_version = "Latest_available",
                    type = "short", verbose = TRUE)

Arguments

data_dir

(character) the same directory used to save the data downloaded from Flora e Funga do Brasil using the get_florabr function.

data_version

(character) the version of Flora e Funga do Brasil database to be loaded. It can be "Latest_available", which will load the latest version available; or another specified version, for example "393.364". Default = "Latest_available".

type

(character) it determines the number of columns that will be loaded. It can be "short" or "complete". Default = "short". See details.

verbose

(logical) Whether to display messages during function execution. Set to TRUE to enable display, or FALSE to run silently. Default = TRUE.

Value

A data.frame with the specified version (Default is the latest available) of the Flora e Funga do Brasil database. This data.frame is necessary to run most of the functions of the package.

Details

The parameter type accepts two arguments. If type = short, it will load a data.frame with the 20 columns needed to run the other functions of the package: species, scientificName, acceptedName, kingdom, Group, Subgroup, family, genus, lifeForm, habitat, Biome, States, vegetationType, Origin, Endemism, taxonomicStatus, nomenclaturalStatus, vernacularName, taxonRank, and id If type = complete, it will load a data.frame with all 39 variables available in Flora e Funga do Brasil database.

References

Flora e Funga do Brasil. Jardim Botânico do Rio de Janeiro. Available at: http://floradobrasil.jbrj.gov.br/

Examples

if (FALSE) {
#Creating a folder in a temporary directory
#Replace 'file.path(tempdir(), "florabr")' by a path folder to be create in
#your computer
my_dir <- file.path(file.path(tempdir(), "florabr"))
dir.create(my_dir)
#Download, merge and save data
get_florabr(output_dir = my_dir, data_version = "latest", overwrite = TRUE,
            verbose = TRUE)
#Load data
df <- load_florabr(data_dir = my_dir, data_version = "Latest_available",
type = "short")
}