Package 'baad.data'

Title: Retrieve Data From the 'BAAD' (Biomass And Allometry Database)
Description: Retrieves data from the Biomass And Allometry Database ('baad'). This simplifies the task of keeping a consistently referenceable set of data on a computer without having to manually cache it.
Authors: Daniel Falster, Rich FitzJohn
Maintainer: Daniel Falster <[email protected]>
License: BSD_2_clause + file LICENSE
Version: 1.0.1
Built: 2026-05-16 06:20:34 UTC
Source: https://github.com/traitecoevo/baad.data

Help Index


Load the BAAD database

Description

Load data from the Biomass and Allometry Database.

Usage

baad_data(version = NULL, path = NULL)

baad_data_del(version, path)

Arguments

version

Version to load. Verion "1.0.0" corresponds to the version published in Ecology in 2015. Other valid versions are "0.1.0", "0.2.0" and "0.9.0" which are stored on github but are of historical interest only.

path

Optional path in which to store the data. If omitted we use rappdirs to generate a reasonable path.

Details

The first time this is run for a given version, this function will download the Biomass and Allometry Database (BAAD) from github, using numbered versions), unpack the resulting zip file and load the csv files. This might take a few seconds to a minute. Subsequent calls will be considerably quicker because we cache both the downloaded data and the result of reading the csv. Subsequent calls after that will be essentially instantaneous.

The function baad_delete deletes all traces of downloaded BAAD data if a version is not given, or a specific version if that is listed.

Examples

## Not run: 
baad <- baad_data()
head(baad$data)

## End(Not run)

Github release information

Description

Information to describe how to process github releases

Usage

baad_data_info(path = NULL)

Arguments

path

Optional path in which to store the data. If omitted we use rappdirs to generate a reasonable path.


Get release versions

Description

Get release versions

Usage

baad_data_versions(local = TRUE, path = NULL)

baad_data_version_current(local = TRUE, path = NULL)

Arguments

local

Should we return local (TRUE) or github (FALSE) version numbers? Github version numbers are pulled once per session only. The exception is for github_release_version_current which when given local=TRUE will fall back on trying github if there are no local versions.

path

Optional path in which to store the data. If omitted we use rappdirs to generate a reasonable path.##'