Skip to contents

Create a recordset_df, a lightweight extension of dataset::dataset_df for representing archival Record Sets.

A recordset_df stores dataset-level metadata together with optional Record and Record Part identifiers using lightweight conventions inspired by the Records in Contexts (RiC) model. It supports provenance-aware archival, curatorial and semantic enrichment workflows while remaining compatible with ordinary data frames.

See the "Working with Record Sets" vignette for a complete workflow starting from filesystem observations.

Usage

recordset_df(
  x,
  title = NULL,
  creator = utils::person("Jane", "Doe"),
  description = NULL,
  record_set_identifier = NULL,
  record_identifier = NULL,
  record_part_identifier = NULL,
  record_subject = "Record Set",
  ...
)

Arguments

x

A data.frame or dataset_df.

title

Character scalar giving the title of the Record Set.

creator

A utils::person() object describing the creator of the Record Set metadata.

description

Optional description of the Record Set.

record_set_identifier

Optional identifier of the Record Set.

record_identifier

Name of the column containing Record identifiers. The selected column is annotated as rico:Identifier and labelled "Record Identifier".

record_part_identifier

Name of the column containing Record Part identifiers. The selected column is annotated as rico:Identifier and labelled "Record Part Identifier".

record_subject

Subject term describing the Record Set. Defaults to "Record Set".

...

Reserved for future extensions.

Value

A recordset_df, which inherits from dataset_df, tbl_df, tbl and data.frame.

References

International Council on Archives Expert Group on Archival Description (2023). Records in Contexts (RiC). https://www.ica.org/ica-network/expert-groups/egad/records-in-contexts-ric/

Examples

x <- data.frame(
  resource_locator = c(
    "https://example.org/1", "https://example.org/2"
  ),
  filename = c("a.html", "b.html"),
  stringsAsFactors = FALSE
)

rs <- recordset_df(
  x,
  title = "Demo Record Set",
  creator = utils::person("Joe", "Doe", role = "aut"),
  record_identifier = "resource_locator",
  record_part_identifier = "filename"
)

rs
#> Doe (:tba): Demo Record Set [dataset]
#>   rowid resource_locator      filename 
#>   <chr> <chr>                 <chr>   
#> 1 obs1  https://example.org/1 a.html  
#> 2 obs2  https://example.org/2 b.html