Skip to contents

Converts a contextual Record Set projection created with create_record_set() into a semantically enriched recordset_df object.

Usage

as_recordset_df(
  x,
  title,
  creator,
  member_id = "resource_id",
  member_path = "locator_path",
  member_type = "resource_type",
  description = NULL,
  publisher = NULL,
  subject = NULL
)

Arguments

x

A tibble or data.frame, typically created with create_record_set().

title

Human-readable title of the contextual Record Set.

creator

Creator metadata passed to dataset::dublincore().

member_id

Character scalar giving the column name in x that should be mapped to member_id in the resulting recordset_df.

Defaults to "resource_id".

member_path

Optional character scalar giving the column name in x that should be mapped to member_path.

Defaults to "locator_path".

member_type

Optional character scalar giving the column name in x that should be mapped to member_type.

Defaults to "resource_type".

description

Optional textual description documenting the contextual scope, construction logic, provenance assumptions, or analytical purpose of the Record Set.

publisher

Optional publisher metadata passed to dataset::dublincore().

subject

Optional subject metadata for future semantic enrichment.

Value

A semantically enriched recordset_df object inheriting from:

  • recordset_df

  • dataset_df

  • tbl_df

Details

The function adds lightweight dataset-level semantics and publication metadata while preserving tidyverse compatibility.

This staged design deliberately separates:

from:

  • semantic stabilisation and publication (as_recordset_df())

The resulting object aligns with the package philosophy of:

  • observational acquisition,

  • contextual enrichment,

  • deferred semantic interpretation.

as_recordset_df() is conceptually aligned with:

  • RiC-O Record Set projections,

  • contextual research workspaces,

  • analytical Heritage Digital Twin layers,

  • and semantically enriched reconstruction corpora.

The function builds on the dataset_df framework and therefore inherits:

  • tibble semantics,

  • lightweight dataset metadata,

  • publication-oriented enrichment,

  • and future linked-data extensibility.

The function also acts as a lightweight semantic alignment layer between:

  • operational resource-oriented contextualisation

and:

  • semantically stabilised record set member representations.

Operational columns are mapped into the opinionated recordset_df vocabulary:

  • resource_idmember_id

  • locator_pathmember_path

  • resource_typemember_type

by default, although alternative mappings may be supplied.

The function creates lightweight semantic metadata but intentionally avoids:

  • authoritative archival description,

  • full RiC-O graph construction,

  • provenance reasoning,

  • or ontology-complete archival modelling.

This lightweight semantic layer is intended for:

  • analytical reconstruction,

  • contextual reporting,

  • HDTO-like analytical workspaces,

  • and iterative semantic enrichment workflows.

Examples

toy_record_set <- tibble::tibble(
  structural_group = c(
    "_packages/eviota",
    "_packages/eviota",
    "_packages/iotables"
  ),
  path_id = c(
    "l480::R/import.R",
    "l480::data-raw/build.R",
    "l480::R/cube.R"
  ),
  rel_root_path = c(
    "R/import.R",
    "data-raw/build.R",
    "R/cube.R"
  )
)

toy_record_set <- toy_record_set |>
  create_record_set(
    record_set_id = "structural_group",
    resource_id = "path_id",
    locator_path = "rel_root_path",
    construction_rule =
      "filtered_project_roots|structural_group",
    resource_type = "file"
  ) |>
  as_recordset_df(
    title = "Toy reconstruction workspace",
    creator = person("Daniel", "Antal"),
    description =
      "Contextual reconstruction record set"
  )