Modernising Citation Metadata in R: Introducing `bibrecord`"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(dataset)

Why We Needed bibrecord

The base R function utils::bibentry() provides a way to structure citation metadata. While effective for simple references, it falls short for modern metadata standards like:

Both require clear distinction between creators, contributors, and richly typed relationships — things bibentry() doesn't natively support.

To bridge this gap while preserving compatibility with base R, the bibrecord class builds on top of bibentry, adding support for:

What is bibrecord

A bibrecord is a standard bibentry object with additional fields stored in attributes. This means:

Creating a bibrecord

person_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"
)

Printing a bibrecord

print(rec)

This prints both the base citation and the contributors, clearly labelled.

Compatibility with Existing Infrastructure

Because bibrecord inherits from bibentry:

Future Extensions

The bibrecord class can be further enriched by:

Summary

| Feature | bibentry | bibrecord | |----------------|------------|-------------| | Base R support | ✅ | ✅ | | Contributors | ❌ | ✅ | | Semantic roles | ❌ | ✅ | | DCTERMS export | ❌ | ✅ | | DataCite-ready | ❌ | ✅ |

bibrecord is your drop-in upgrade for structured metadata in R.

Start simple. Stay compatible. Go semantic.



Try the dataset package in your browser

Any scripts or data that you put into this service are public.

dataset documentation built on June 8, 2025, 10:15 a.m.