knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

seabirddietDB

Travis build status Codecov test coverage

The goal of seabirddietDB is to provide access and tools to interact with a database of seabird diets collected around the British Isles.

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("annakrystalli/seabirddietDB")

Data

For more details on the dataset, check out the full documentation

Example

To access the data simply load the package. The data is then available

library(seabirddietDB)
seabirddiet
tibble::as_tibble(seabirddiet)

A version with more formal data types/structures in the columns (ie geographic information stored as sf, categorical data as factors etc) is also available. Note that you will need package sf installed to load this version of the data.

class(seabirddiet_)

Helpers

metadata

A number of metadata datasets are included with the package: attributes, references and classification. Load them as you would one of the datasets, e.g. :

references

List

List predators

sbd_predators()

List prey

sbd_prey(verbose = TRUE)

Filter data

filter predator

sbd_filter(pred_species = "Fratercula arctica")

filter metrics

sbd_filter(pred_species = "Fratercula arctica", metrics = "freq_biomass")

filter prey

sbd_filter(prey_taxon = c("Cottidae", "Actinopterygii"))

filter year

sbd_filter(year = 1973:1976)

filter multiple

sbd_filter(year = 1973:1976, pred_species = "Uria aalge", prey_taxon = "Gadidae")

Plot data

There are additional helpers for interactive plotting of data

sbd_plot_predators(year = 1973)

To cite use

citation("seabirddietDB")


annakrystalli/seabirddietDB documentation built on Nov. 2, 2019, 1:54 p.m.