Skip to contents

retraction helps you avoid citing retracted papers. It reads documents and bibliographies, extracts identifiers, checks them against retraction data, and reports the retracted references it finds.

The code chunks that reach the network are shown but not run here, so this article builds offline. Run them in your own session.

library(retraction)
#> retraction 0.1.0: find retracted references in documents and bibliographies.
#>   Get started with check_file(), check_dois(), or check_refs(). GitHub: https://github.com/choxos/retraction

Checking a file

check_file() reads a document or bibliography and checks every reference. Structured formats have their identifiers read from fields: BibTeX and BibLaTeX (.bib), CSL-JSON (.json), RIS (.ris), EndNote XML, and JATS XML. For Word (.docx), PDF (.pdf, which needs the optional pdftools package), and text documents (.Rmd, .qmd, .tex, .md, .txt, .html), DOIs are scraped from the text, so references without a DOI in the text are not detected.

bib <- system.file("extdata", "example.bib", package = "retraction")
result <- check_file(bib)
result

The result is a tibble with one row per reference. Key columns include status (retracted, expression_of_concern, correction, reinstated, none, or unchecked), is_retracted (a convenience flag), confidence, retraction_date, days_since_retraction, reason, and sources.

retracted(result)                 # just the flagged citations
render_report(result, "report.html")

Checking identifiers or a data frame

check_dois(c("10.1016/S0140-6736(97)11096-0", "10.1038/s41586-020-2649-2"))

The bundled retraction_example data frame shows the shape check_refs() expects; columns are auto-detected.

retraction_example
#>                             doi
#> 1 10.1016/S0140-6736(97)11096-0
#> 2     10.1038/s41586-020-2649-2
#> 3       10.1126/science.aac4716
#>                                                                                                        title
#> 1 Ileal-lymphoid-nodular hyperplasia, non-specific colitis, and pervasive developmental disorder in children
#> 2                                                             Structure of the SARS-CoV-2 spike glycoprotein
#> 3                                                    Estimating the reproducibility of psychological science
#>   year                            note
#> 1 1998 Retracted by The Lancet in 2010
#> 2 2020          Control: not retracted
#> 3 2015          Control: not retracted
check_refs(retraction_example)

PubMed Central articles

check_pmc() takes a PMID, PMCID, DOI, title, or a whole reference, resolves it to a PubMed Central article, reports whether the open-access full text is available, and if so checks that article’s reference list for retractions.

res <- check_pmc(c("PMC5334499", "10.1371/journal.pone.0000217"))
pmc_articles(res)   # open-access status per input
retracted(res)      # retracted references found in those articles

Choosing sources

The default source is Retraction Watch ("xera"). You can add Crossref and OpenAlex, and the results are reconciled across them.

list_backends()
check_dois("10.1016/S0140-6736(97)11096-0",
           sources = c("xera", "crossref", "openalex"))

Offline mode

For bulk or private checking, download a local snapshot once and match against it. Updates are incremental.

retraction_sync()
check_file("manuscript.Rmd", offline = TRUE)

Identifier normalization

The normalization helpers are exported and useful on their own.

normalize_doi("https://doi.org/10.1016/S0140-6736(97)11096-0")
#> [1] "10.1016/s0140-6736(97)11096-0"
normalize_pmid("PMID: 9500320")
#> [1] "9500320"