invert_contextual_grouping: Invert contextual grouping mappings

View source: R/invert_contextual_grouping.R

invert_contextual_groupingR Documentation

Invert contextual grouping mappings

Description

invert_contextual_grouping() transforms lightweight contextual grouping definitions into a two-column table of group membership.

This is useful when contextual roots, resources, or candidate Record Set members are first declared as a named list but later need to be used in joins, rulebooks, or reconstruction workflows.

Usage

invert_contextual_grouping(x)

Arguments

x

A named list. Each list name identifies a contextual group, and each list element contains one or more members of that group.

Details

Convert a named list of contextual groupings into a long-form relational table.

The function performs a lightweight structural transformation.

It does not validate ontology semantics, enforce uniqueness, construct graph objects, or infer hierarchical relations.

The result is suitable for relational operations such as joins, filtering, contextual reconstruction, and candidate Record Set membership workflows.

Value

A tibble with two columns:

group

Contextual grouping identifier.

member

Member associated with the contextual group.

See Also

as_value_key(), invert_value_key()

Examples

record_sets <- list(
  conceptualisation = c(
    "D:/_packages/alpha",
    "D:/_markdown/alpha-methodology"
  ),
  beta = c(
    "D:/_packages/beta",
    "D:/_packages/prebeta"
  )
)

invert_contextual_grouping(record_sets)


fscontext documentation built on Nov. 19, 2026, 5:11 p.m.