View source: R/pbdb_temporal_functions.R
pbdb_richness | R Documentation |
Returns a data frame of temporal variation in taxon richness in the indicated temporal extent and resolution from the provided occurrence data and optionally produces a plot from it.
pbdb_richness(
data,
rank = c("species", "genus", "family", "order", "class", "phylum"),
res = 1,
temporal_extent = c(0, 10),
colour = "#0000FF30",
bord = "#0000FF",
ylab = "Richness",
do_plot = TRUE
)
data |
Data frame from a query to PaleobioDB as returned by
|
rank |
The taxon rank to be analyzed. The default value is
|
res |
Numeric. Sets the duration of the intervals in the temporal extent. |
temporal_extent |
Numeric vector to set the temporal extent (min, max). |
colour |
Colour of the area of the polygon in the plot. |
bord |
Colour of the border of the polygon. |
ylab |
A label for the y axis. |
do_plot |
Logical indicating whether to produce a plot ( |
A data frame with the richness aggregated by the taxon rank in the specified temporal extent and resolution.
## Not run:
data <- pbdb_occurrences(
limit = "all",
vocab = "pbdb",
base_name = "Canidae",
show = "class"
)
pbdb_richness(data, rank = "species", res = 0.2, temporal_extent = c(0, 3))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.