A dataset's dataset reference (the dataset itself) is a single entry, which this overwrites, keyed by the dataset_id. Its source references (for a compilation, the studies observations were taken from, each named in the data's source_id) and secondary references (later publications re-using the same data) are lists: the reference is appended, or replaces the listed entry that already has its key, in metadata.yml or in the file the list is kept in. See util_flatten_sources() for the shape of the block.

metadata_add_source_bibtex(
  dataset_id,
  file,
  type = "dataset",
  drop = c("dateobj", "month")
)

Arguments

dataset_id

Identifier for a particular study in the database

file

Name of file where reference is saved

type

Type of reference: dataset, source or secondary

drop

Variables in bibtex to ignore

Value

metadata.yml file with citation details added