Flags a missing Authors@R, and an unfilled usethis or package.skeleton() template such as person("First", "Last", ...) or person("Givenname", "Familyname", ...), which is a hard CRAN rejection that R CMD check says nothing about.
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
The field is evaluated without running any code it contains: only
person(), as.person(), c(), list(), paste(), paste0() and (
resolve, the calls R's own reader allows from R 4.6.0 on. Every other call
in the field is reported, since R CMD build refuses it as a malformed
Authors@R field. That includes a namespaced utils::person() and a
function in parentheses, as in (c)(...), which are still read so the
other checks see their roles.
Source
The CRAN Repository Policy
treats a placeholder or malformed Authors@R, including a missing
maintainer, as a rejection. 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/authors_bad.txt",
show_content = FALSE)
lab_authors(pkg, verbose = FALSE)$issues
#> [1] "Missing Authors@R field"
unlink(pkg, recursive = TRUE)