Learn R Programming

pacha (version 0.1.1)

establishment_pacha: Retrieve establishment status

Description

Retrieves the documented establishment means of a taxon -- native, introduced, cultivated, naturalized, and so on. The API source reads the ChecklistBank taxon-distribution endpoint. The local source reads Distribution.tsv and prefers the entry matching the configured coldp_country; when several equally relevant records remain, it selects the lowest ColDP identifier and reports this through a warning raised by the plain-text accessor.

Usage

establishment_pacha(species, language = NULL, source = NULL, refresh = FALSE)

establishment_pacha_md( species, language = NULL, source = NULL, refresh = FALSE )

Value

establishment_pacha() prints and invisibly returns a translated establishment category, or the localized no-data/connection message. establishment_pacha_md() returns, invisibly, the emitted Markdown string, or "" when the source has no establishment record.

Arguments

species

Character scalar containing at least a genus and specific epithet.

language

Optional output-language code or alias used to translate the establishment category and 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.

Details

Values are translated through the selected language dictionary's establishment mapping. Values absent from that mapping are returned in sentence case rather than rejected, so datasets using additional establishment categories remain usable.

See Also

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

Examples

Run this code
if (FALSE) {
establishment_pacha("Bidens andicola")
establishment_pacha("Bidens andicola", source = "coldp", language = "en")
}
if (FALSE) {
establishment_pacha_md("Bidens andicola", language = "en")
}

Run the code above in your browser using DataLab