Diagnose Unexplained Acronyms in DESCRIPTION
Source:R/diagnostics-description-names.R
lab_acronyms.RdFlags an acronym in Description that is never spelled out. A parenthetical gloss in either order counts as explained.
Arguments
- path
Character. Path to the package directory. Default:
".".- verbose
Logical. Print diagnostic output. Default:
TRUE.- desc
Optional pre-parsed
DESCRIPTION, as returned bybase::read.dcf(). Defaults to reading it frompath.
Value
checktor_check_result() with passed, issues, message.
Details
A name in single quotes, straight or typographic, is not read as an acronym,
so 'YAML' or 'MATLAB' written as lab_language_names() and
lab_format_names() ask is not reported here. Nor is anything inside a web
address, a <doi:...>, a function call or a quotation in double quotes,
straight or typographic, such as the title of an article.
Source
The CRAN Cookbook covers this under
Explaining Acronyms.
Reviewers ask for an acronym to be spelled out once, but nothing enforces it,
which is why this sits at opinion tier. See
vignette("check-sources", package = "checktor") for how every check maps to its
source.
See also
checktor(), which runs this and every other check.
Examples
pkg <- example_diagnose_scenario("description_examples/acronyms_bad.txt",
show_content = FALSE)
lab_acronyms(pkg, verbose = FALSE)$issues
#> [1] "DEFF" "ESS"
unlink(pkg, recursive = TRUE)