Map Crossref data to reference input fields
Source:R/mod_references_fct_crossref.R
map_crossref_to_reference_fields.RdConverts Crossref API response data into a list of values that correspond to the reference module input fields.
Usage
map_crossref_to_reference_fields(crossref_data, 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 Crossref data.
Details
Maps Crossref fields to reference fields:
type → REFERENCE_TYPE (journal-article → journal, book → book, etc.)
title → TITLE
author → AUTHOR (formatted as Last, First; Last, First)
published.online/published.print → YEAR
container.title → PERIODICAL_JOURNAL
volume → VOLUME
issue → ISSUE
publisher → PUBLISHER
DOI → DOI
URL → URL
page → PAGES
ISBN/ISSN → ISBN_ISSN
Examples
if (FALSE) { # \dontrun{
result <- lookup_crossref_doi("10.1016/j.marpolbul.2022.01.001")
fields <- map_crossref_to_reference_fields(result$data)
fields$TITLE
} # }