| new_external_schema | R Documentation |
Create a reusable "external_schema" object that records how source columns in an external inventory correspond to the standardized field names used by the basifoR external workflow. The schema can also store declared measurement units, default grouping levels, columns to preserve during processing, and auxiliary defaults that wrapper functions may reuse across repeated calls.
new_external_schema(colmap,
units = list(), levels = NULL,
keep_cols = NULL,
defaults = list())
colmap |
Named |
units |
Named |
levels |
Optional |
keep_cols |
Optional |
defaults |
Optional named |
The returned object is lightweight. It validates the basic
structure of the inputs, assigns class
c("external_schema", "list"), and leaves semantic
interpretation to downstream helpers such as
externalMetrics(), externalMetrics2Vol(), or
external_dendroMetrics().
An object of class "external_schema" containing normalized colmap, units, levels, keep_cols, and defaults components, ready to pass to external workflow wrappers.
Wilson Lara [aut, cre] (ORCID: <https://orcid.org/0000-0003-3527-1380>), Cristobal Ordonez [aut] (ORCID: <https://orcid.org/0000-0001-5354-3760>), Aitor Vázquez-Veloso [aut] (ORCID: <https://orcid.org/0000-0003-0227-506X>), Felipe Bravo [aut] (ORCID: <https://orcid.org/0000-0001-7348-6695>)
sch <- new_external_schema(
colmap = list(
plot = c("plot_id", "plot"),
species = c("species_code", "sp"),
d = c("dbh_mm", "diameter_mm"),
h = c("height_m", "h")
),
units = list(d = "mm", h = "m"),
levels = "plot",
keep_cols = c("plot_id", "species_code"),
defaults = list(selector = "priority")
)
class(sch)
sch$colmap$d
sch$units
sch$levels
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.