
Fail (or warn) a knit when the document cites retracted work.
Source:R/knit.R
retraction_knit_check.RdCall from a setup chunk. Checks the document and/or its bibliography; if the fail policy is triggered it aborts (or warns) the render.
Arguments
- input
Path to the document being knit. Defaults to
knitr::current_input()when knitting.- bib
Optional path(s) to bibliography files to check as well.
- on
Fail policy states (see
fail_policy()): any of"flagged","possible","unchecked","error". Default"flagged".- action
"error"(default; abort the render) or"warn".- sources, offline
Passed to
check_file().
Examples
if (FALSE) { # \dontrun{
retraction::retraction_knit_check(bib = "refs.bib",
on = c("flagged", "unchecked"))
} # }