rt_meta_pmc: Extract article metadata from a PMC XML file.

View source: R/rt_meta_pmc.R

rt_meta_pmcR Documentation

Extract article metadata from a PMC XML file.

Description

Reads a PMC XML file and returns its metadata as a one-row data frame: journal, publisher, article title, authors and affiliations, identifiers (PMID, PMCID, DOI), publication dates, and figure / table / reference counts.

Usage

rt_meta_pmc(filename, remove_ns = FALSE)

Arguments

filename

The path to the PMC XML file as a string.

remove_ns

TRUE if an XML namespace should be removed, else FALSE (default).

Value

A one-row tibble of metadata. The column 'is_success' indicates whether the file was parsed successfully.

Examples


filepath <- system.file(
  "extdata", "PMID32171256-PMC7071725.xml", package = "rtransparency"
)
rt_meta_pmc(filepath, remove_ns = TRUE)


rtransparency documentation built on July 1, 2026, 9:07 a.m.