pbdb_richness {paleobioDB} | R Documentation |
Temporal variation in taxon richness
Description
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.
Usage
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
)
Arguments
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 ( |
Value
A data frame with the richness aggregated by the taxon rank in the specified temporal extent and resolution.
Examples
## 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)