View source: R/derive_record_set.R
| derive_record_set | R Documentation |
Assign observational units to one or more contexts using declared filesystem boundaries.
derive_record_set(
x,
contextual_groups,
observed_unit_var = "observed_unit",
include_subfolders = TRUE
)
x |
A data frame containing observational units,
typically created with |
contextual_groups |
A data frame defining contextual boundaries. Must contain:
|
observed_unit_var |
Name of the column containing observational units. Defaults to "observed_unit". |
include_subfolders |
Logical. Currently retained for future compatibility. Membership is derived recursively. |
derive_record_set() creates a contextual membership layer over an observational universe. Membership is derived by matching observational units against one or more declared context roots.
The function is intended as an intermediate step between filesystem observation and Record Set construction.
In a software repository, contexts may correspond to projects, packages, or reporting workflows. In archival environments, contexts may correspond to collections, fonds, or other documentary aggregations.
Membership is currently derived using recursive path-prefix matching.
A tibble containing observational units assigned to one or more contexts.
Additional variables include:
Context identifier.
Root used for membership derivation.
Membership derivation method.
Function that created the assignment.
Timestamp of derivation.
toy_universe <- tibble::tibble(
observed_unit = c(
"D:/projects/eviota",
"D:/projects/eviota/tests",
"D:/other"
),
inst_id = c("a", "b", "c")
)
contextual_groups <- tibble::tibble(
context = "eviota",
root = "D:/projects/eviota"
)
derive_record_set(
toy_universe,
contextual_groups
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.