knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE # desperate times calls for desperate measures )
Package rocc
allows the user to perform searches in the List of Species of the Brazilian Flora (FB2020) database from fields other than scientificName.
These functions download the IPT files from FB2020 to a temporary file in the computer, using package finch. This download can be very slow the first time and when in disk the database will access the cached files instead of downloading them.
update_flora()
update_flora()
will download the ipt files into folder data-raw. If a previous file exists in cache, it won't update unless force_update = TRUE
.
Also, the function returns all name ids irrespective of their taxonomic status
search_flora()
Function search_flora()
returns lists of scientific names (in full format) for species in:
library(Rocc)
devtools::load_all()
Here is an example of the differences between searching for species in a domain:
baf <- search_flora(domain = "Mata Atlântica", force_update = FALSE) head(baf) dim(baf)
rj <- search_flora(stateProvince = "RJ") head(rj) dim(rj)
length(intersect(baf$id, rj$id))
rj_and_baf <- search_flora(domain = "Mata Atlântica", stateProvince = "RJ") head(rj_and_baf) dim(rj_and_baf)
rj_and_baf_and_not_endemic <- search_flora(domain = "Mata Atlântica", stateProvince = "RJ", endemism = FALSE) head(rj_and_baf_and_not_endemic) dim(rj_and_baf_and_not_endemic)
rj_and_baf_and_endemic <- search_flora(domain = "Mata Atlântica", stateProvince = "RJ", endemism = TRUE) head(rj_and_baf_and_endemic) dim(rj_and_baf_and_endemic)
rj_and_baf_and_tree <- search_flora(domain = "Mata Atlântica", stateProvince = "RJ", life_form = "Arbusto") head(rj_and_baf_and_tree) dim(rj_and_baf_and_tree)
campos_de_altitude <- search_flora(domain = "Mata Atlântica", vegetation_type = c("campo de altitude")) head(campos_de_altitude) dim(campos_de_altitude)
campos_de_altitude_shrub <- search_flora(domain = "Mata Atlântica", life_form = "arbusto", vegetation_type = c("campo de altitude")) head(campos_de_altitude_shrub) dim(campos_de_altitude_shrub)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.