kelp: Get Kelp forest community data.

View source: R/kelp.R

kelpR Documentation

Get Kelp forest community data.

Description

Get Kelp forest community data.

Usage

kelp(dataset = "benthic_cover", path = "~/.ots/kelp", overwrite = TRUE)

kelp_datasets()

kelp_metadata(name = NULL, path = "~/.ots/kelp")

Arguments

dataset

A dataset code name, see kelp_datasets

path

A path to store the files, Default: ~/.ots/kelp

overwrite

(logical) To overwrite the path to store files in or not, Default: TRUE.

name

Metadata table name

Details

After one download o the dataset, you won't have to download the data again.

The kelp function is to get datasets, e.g., benthic cover data. The output of each call to kelp includes the data, and both the headers and variables metadata tables for that dataset. In addition, the citation to the data is included. See examples below for how to index to each of those.

The kelp_datasets function simply lists the datasets available. You can pass the code to kelp.

The kelp_metadata function is to both list the metadata tables available, and to retrieve those metadata tables, including: sites, data_updates, metadata_updates, history, and species.

References

http://esapubs.org/archive/ecol/E094/245/metadata.php

Examples

## Not run: 
# list of datasets
kelp_datasets()

# read in various metadata files
## list metadata tables
kelp_metadata()
## get a table
head( kelp_metadata("sites") )
head( kelp_metadata("data_updates") )
head( kelp_metadata("metadata_updates") )
head( kelp_metadata("history") )
head( kelp_metadata("species") )

# get data
(res <- kelp("benthic_cover"))
head(res$headers)
head(res$vars)
res$citation

(res <- kelp("benthic_density"))
(res <- kelp("fish_density"))
(res <- kelp("fish_size"))
(res <- kelp("invert_size"))
head(res$headers)
(res <- kelp("subtidal"))
(res <- kelp("rdfc"))
(res <- kelp("kelp_size"))
(res <- kelp("kelp_supp_dens"))
(res <- kelp("art_recruit"))

## End(Not run)

ropensci/ots documentation built on Sept. 12, 2022, 2:01 p.m.