bibrecordDescriptive metadata is often added as an afterthought or stored
separately from the data it describes. This separation can lead to loss
of context when datasets are shared, archived, or reused. To avoid this,
the dataset package encourages metadata to be embedded at
the time of dataset creation.
For a dataset_df, this means not only providing
variable-level definitions, units, and namespaces, but also including a
complete, standards-aligned citation record for the dataset itself.
Encoding citation information early ensures that it travels with the
data, supports the FAIR principles (Findable, Accessible, Interoperable,
Reusable), and is ready for export to modern metadata formats.
In the Design Principles & Future Work Semantically Enriched, Standards-Aligned Datasets in R, we identify three objectives for dataset-level citation metadata:
dataset_df and base R toolsThe base R function utils::bibentry() offers a way to
structure citation metadata and works well for simple references.
However, it does not fully support DCTERMS or DataCite, which
require:
The bibrecord class builds on bibentry to
bridge this gap while remaining fully compatible with base R. It
adds:
person() entries for contributorsIdeally, bibrecord should evolve in close coordination
with utils::bibentry() or be replaced by a modernised
bibentry that supports these capabilities natively,
achieving the three objectives described above.
bibrecordA bibrecord is a standard bibentry object
with additional fields stored as attributes. This means:
bibentrycontributor, subject, and
identifierbibrecordperson_jane <- person("Jane", "Doe", role = "cre")
person_alice <- person("Alice", "Smith", role = "dtm")
rec <- bibrecord(
title = "GDP of Small States",
author = list(person_jane),
contributor = list(person_alice),
publisher = "Tinystat",
identifier = "doi:10.1234/example",
date = "2023-05-01",
subject = "Economic indicators"
)bibrecordWhen printed, a bibrecord shows the standard citation
along with clearly labelled contributor and metadata fields.
Because bibrecord inherits from
bibentry:
It works with citation() and other base R citation
tools
It integrates into existing bibliographic workflows
It can be converted to as_dublincore() or
as_datacite() without loss of information
Planned enhancements to bibrecord include:
funder,
geolocation, and relatedIdentifierIn the broader context described in Design Principles & Future Work Semantically Enriched, Standards-Aligned Datasets in R, the long-term goal is to ensure that dataset-level citation metadata in R meets three objectives:
dataset_df and base R toolsTo achieve this, bibrecord should either evolve in close
coordination with utils::bibentry() or, ideally, be
replaced entirely by a modernised version of bibentry that
supports these capabilities natively.
The bibrecord class extends base R’s
bibentry to provide structured, standards-aligned citation
metadata that can be embedded directly into a dataset_df.
It keeps full compatibility with existing R workflows while adding
support for contributor roles, richer metadata fields, and export to
standards like DCTERMS and DataCite.
Embedding a bibrecord in a dataset_df
ensures that citation information is:
By adopting bibrecord, you can create datasets that are
ready for FAIR-compliant publishing, are easier to share, and maintain
their full descriptive context throughout their lifecycle.