Learn R Programming

pacha (version 0.1.1)

sustainable_uses_pacha: Retrieve sustainable-use records

Description

Retrieves sustainable-use categories and values from the configured source: the ChecklistBank taxon-property endpoint for the API source, or TaxonProperty.tsv for the local source. In either case, categories matching use_exclude_pattern are dropped. This keeps the function usable with any compatible property-based dataset, while remaining well suited to the Ecuadorian sustainable-use dataset used in the examples below.

Usage

sustainable_uses_pacha(
  species,
  use = NULL,
  language = NULL,
  source = NULL,
  refresh = FALSE
)

sustainable_uses_pacha_md( species, use = NULL, language = NULL, source = NULL, refresh = FALSE )

Value

sustainable_uses_pacha() prints and invisibly returns a Category: heading followed by one indented use per line, for every matching category, or the localized no-data/connection message. sustainable_uses_pacha_md() returns, invisibly, the emitted Markdown string, or "" when no matching sustainable-use data are available.

Arguments

species

Character scalar containing at least a genus and specific epithet.

use

Optional category name or fragment, matched case-insensitively. NULL returns every available category.

language

Optional output-language code or alias used for labels.

source

Optional source override: "api"/"web" or "coldp"/"local". NULL uses the configured default ("api").

refresh

Logical scalar. If TRUE, fetches the selected source again instead of reusing its cached record.

See Also

accessors-pacha for a detailed description of plain-text and Markdown accessors.

Examples

Run this code
if (FALSE) {
sustainable_uses_pacha("Bidens andicola")
sustainable_uses_pacha("Bidens andicola", use = "medicinal", source = "coldp")
}
if (FALSE) {
sustainable_uses_pacha_md("Bidens andicola", use = "medicinal")
}

Run the code above in your browser using DataLab