This is the template object for an R6 database containing PREDICTS or PREDICTS-like data. Functions are provided to prepare the data for modelling and visualise the data.
References
De Palma, A., Abrahamczyk, S., Aizen, M. et al. Predicting bee community responses to land-use changes: Effects of geographic and taxonomic biases. Sci Rep 6, 31153 (2016). https://doi.org/10.1038/srep31153
Public fields
dataset_name(
character())
Identifies the dataset used.last_update(
character())
Identifies the most recent update to the Database (YYYY-MM-DD).paths(
list())
Identifies the files used to create the Database object.sites(
data.frame)
Stores information on the sites within the Database.species(
data.frame)
Stores information on the species within the Database.diversity_within(
tibble)
Stores information on biodiversity metrics calculated for each site (i.e. alpha diversity).diversity_between(
tibble)
Stores information on biodiversity metrics calculated between sites, within studies (i.e. beta diversity).site_contrasts(
data.frame)
Stores information on 'distances' between sites, within studies (e.g., geographic distance).processing_flags(
list())
Stores information on processing that has occurred (e.g., filtering data, adding data).
Methods
HibDatabase$new()
Creates a new instance of this R6 class. Note, this object is constructed via the hib_create_db and hib_update_db functions found within this package.
Usage
HibDatabase$new(dataset_name, paths)Arguments
dataset_name(
character())
Text indicating the dataset contributing to the database being created.paths(
list())
List of paths to the 'species' and 'site' data to be loaded.
HibDatabase$checkself()
Self check function to ensure that the site and species data.frames contain the correct columns and align in content.
HibDatabase$hib_effort_correction()
Function to apply effort correction to the species data. Uses a simple, linear scaling, such that sampling effort of a site is scaled relative to the maximum value per study, and multiplied by the original measure of diversity.
HibDatabase$plot()
Function to generate figures summarising the site-level data present in the HibDatabase.
Arguments
type(
character()) Options are: "map-sites", "map-studies", "biome-N", "ecoregion-N", "realm-N", "class-N".