ms_manifest: Provenance manifest for an analysis

View source: R/manifest.R

ms_manifestR Documentation

Provenance manifest for an analysis

Description

Records what is needed to understand and repeat an analysis: the software environment, the versions of the ecosystem packages, the data sources consulted (and whether they answered), the methodology versions applied, checksums of input files and the known limitations. The manifest is plain JSON (schema metascience-manifest/1), so any tool can read it.

Usage

ms_manifest(
  sources = list(),
  methods = character(),
  inputs = character(),
  packages = character(),
  limitations = character(),
  generated_at = utc_now()
)

ms_write_manifest(manifest, path)

Arguments

sources

Data sources consulted: a data frame or a list of records with at least source, and optionally ok, count, error and retrieved_at. The consulted element returned by the collectors of openresearchmetrics and narrativecv can be passed as is.

methods

Named character vector of methodology versions, for example c("oa-publications-share" = "1.0.0").

inputs

Paths of input files; each is recorded with its size and MD5 checksum.

packages

Further packages whose versions should be recorded, in addition to the ecosystem packages that are installed.

limitations

Character vector of limitations to report with the results.

generated_at

Timestamp (ISO 8601, UTC).

manifest

An object from ms_manifest().

path

File to write.

Value

An object of class ms_manifest (a list).

For ms_write_manifest(), path, invisibly.

Examples

m <- ms_manifest(
  sources = list(list(source = "openalex", ok = TRUE, count = 25,
                      retrieved_at = "2026-11-02T00:00:00Z")),
  methods = c("oa-publications-share" = "1.0.0"),
  limitations = "OpenAlex coverage is weaker for books."
)
m
ms_write_manifest(m, tempfile(fileext = ".json"))

metascience documentation built on Nov. 23, 2026, 5:07 p.m.