Adds a timing column. The default date is the document's authoring date
(git commit or mtime), which is not the date a specific citation was
added, so the labels are deliberately conservative:
"document_after_retraction" means the document was written after the work
was retracted, not that the citation was knowingly added post-retraction. Pass
citation_dates for true citation-level timing.
Usage
classify_timing(x, document_date = Sys.Date(), citation_dates = NULL)Arguments
- x
A
retraction_result.- document_date
The document's date,
DateorYYYY-MM-DD. Defaults to today; seemanuscript_date_of()to derive it from a file.- citation_dates
Optional named vector (
Date/string) of per-citation dates, named byidor DOI. When supplied for a row, that date is used and the label becomes"cited_after_retraction"/"cited_before_retraction".
Examples
# \donttest{
res <- check_dois("10.1016/S0140-6736(97)11096-0")
classify_timing(res, document_date = "2015-01-01")
#>
#> ── retraction: 1 reference checked ─────────────────────────────────────────────
#> ✖ 1 retracted or flagged
#> ✔ 0 clean
#>
#> ── Flagged citations ──
#>
#> • 10.1016/s0140-6736(97)11096-0: Ileal-lymphoid-nodular Hyperplasia,
#> Non-specific Colitis, and Pervasive Developmental Disorder in Children
#> (retracted 2010-02-06; source: xera)
#>
#> ℹ Full table: `as.data.frame(x)` or `tibble::as_tibble(x)`.
# }
