| rt_all_pmc | R Documentation |
Takes a PMC XML and returns relevant meta-data, as well as whether the article carries each of the eight transparency indicators: Conflicts of Interest (COI), Funding, Protocol Registration, Novelty, Replication, Data sharing, Code sharing and disclosure of generative-AI use. Where a statement is found, the relevant text is also extracted. This is the single-call entry point; it covers the same data and code detection as [rt_data_code_pmc()] and the same AI detection as [rt_ai_pmc()].
rt_all_pmc(filename, remove_ns = FALSE, all_meta = FALSE)
filename |
The name of the PMC XML as a string. |
remove_ns |
TRUE if an XML namespace exists, else FALSE (default). |
all_meta |
TRUE extracts all meta-data, FALSE extracts some (default). |
A dataframe of results. It returns the unique identifiers of the article, whether each indicator of transparency was identified ('is_coi_pred', 'is_fund_pred', 'is_register_pred', 'is_novelty_pred', 'is_replication_pred', 'is_open_data', 'is_open_code' and the year-gated 'is_ai_pred'), the relevant text identified, whether it was identified through a dedicated XML tag (such variables include "pmc" in their name, e.g. “fund_pmc_source”) and whether each labelling function identified relevant text or not. The labeling functions are returned to add flexibility in how this package is used; for example, future definitions of Registration may differ from the one we used. If a labelling function returns NA it means that it was not run. 'is_ai_pred' is 'NA' for articles published before 2023 (see [rt_ai_pmc()]).
# Path to a bundled example PMC XML file.
filepath <- system.file(
"extdata", "PMID32171256-PMC7071725.xml", package = "rtransparency"
)
# Identify and extract meta-data and indicators of transparency.
results_table <- rt_all_pmc(filepath, remove_ns = TRUE, all_meta = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.