pmExtractReferences: Extract references from PubMed XML records
Description
Walks a result returned by pmApiRequest or
pmFetchById and pulls the <ReferenceList> block out of
every record. Returns one row per cited <Reference>, carrying the
source PMID, the free-text citation, and (when present) the cited PMID and
DOI parsed from <ArticleIdList>.
Usage
pmExtractReferences(P)
Value
A data.frame with columns
source_pmid
The PMID of the article that cites the reference.
citation
The free-text <Citation> string from PubMed.
pmid
The PMID of the cited reference (if available).
doi
The DOI of the cited reference (if available).
Returns an empty data.frame (with the same schema) if no references are
found.
Arguments
P
A list following the PubMed XML structure produced by
pmApiRequest() or pmFetchById(). Must contain a $data
element with one entry per record.
Details
Reference data in PubMed XML is populated when the publisher submits a
<ReferenceList> block to NLM (which is now common, but not universal).
This function does not call any web API; it merely parses what is already
present in the XML. Use pmEnrichCitations to also resolve cited
PMIDs into structured WoS-style citation strings.