Description Usage Arguments Value Examples
Gather biodiversity records
1 |
x |
an object of class 'phylodiv' |
db |
(character) the database to use to get taxonomic information. only option is "gbif" for now |
type |
(character) one of count or facet |
by |
(character) only used if 'type = "by"'. one of country, ... |
... |
further args passed on to [rgbif::occ_data()] |
an object of class 'phylodiv', a named list with slots:
- tree - tips - nodes - hierarchies - data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
library(ape)
data(chiroptera)
st <- ape::subtrees(chiroptera)[[393]]
x <- pd_read(st)
res <- pd_taxa(x)
spp <- c("Eptesicus serotinus", "Eptesicus fuscus",
"Eptesicus furinalis", "Eptesicus brasiliensis")
res <- pd_query(res, spp)
# facet data: e.g., facet on country
biodiv <- pd_biodiv(res, type = 'facet', by = "country")
biodiv
biodiv$data
# count data
counts <- pd_biodiv(res, type = 'count')
counts
counts$data
counts$data$count
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.