Package 'leaf13C'

Title: a global dataset of leaf D13C data
Description: These are data from bulk leaf D13C data collected on many different species from across the world.
Authors: Will Cornwell
Maintainer: Will Cornwell <[email protected]>
License: MIT + file LICENSE
Version: 0.2.2
Built: 2026-05-21 09:42:36 UTC
Source: https://github.com/traitecoevo/leaf13C

Help Index


Get leaf13C dataset

Description

Retrieve a versioned copy of the leaf13C dataset

Usage

get_data(version = NULL, path = NULL)

dataset_versions(local = FALSE, path = NULL)

dataset_version_current(local = FALSE, path = NULL)

dataset_del(version, path = NULL)

Arguments

version

Optional character string specifying the dataset version to retrieve. If NULL (default), the most recent available version will be used.

path

Optional file path to store and access the dataset locally. If NULL (default), a system-appropriate location will be used, determined via rappdirs::user_data_dir("leaf13C").

local

Logical indicating if local or github versions should be polled. With any luck, local=FALSE is a superset of local=TRUE. For mydata_version_current, if TRUE, but there are no local versions, then we do check for the most recent github version.

Details

This function provides access to a versioned dataset hosted on GitHub using the datastorr framework. It will download and cache the dataset if not already available locally, and return it as a data frame.

If no version is specified, the most recent available version will be used. If no path is specified, a suitable persistent directory will be chosen automatically using rappdirs::user_data_dir().

Value

A data frame containing the leaf13C dataset.

Examples

# Load the most recent version of the dataset
data <- get_data()

# Load a specific version of the dataset
data <- get_data(version = "0.1.0")

# Use a custom path
data <- get_data(path = "~/my_data")