Map BibTeX fields to reference input fields
Source:R/mod_references_fct_bibtex.R
map_bibtex_to_reference_fields.RdConverts parsed BibTeX data from bib2df format into a list of values that correspond to the reference module input fields. Handles field mapping between BibTeX conventions and the reference data structure.
Usage
map_bibtex_to_reference_fields(bibtex_df, access_date = Sys.Date())Value
A named list containing mapped field values for all reference input fields. Values are NA for fields not present in the BibTeX entry.
Examples
if (FALSE) { # \dontrun{
bibtex_str <- "@article{smith2022,
author = {Smith, Jane},
title = {Marine pollution},
journal = {Marine Pollution Bulletin},
year = {2022}
}"
df <- bib_string2df_alt(bibtex_str)
fields <- map_bibtex_to_reference_fields(df)
fields$TITLE
} # }