Flags a Title that is not in title case, delegating to tools::toTitleCase(), which restores single-quoted spans so 'shiny' keeps its own capitalisation.
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.
Source
Writing R Extensions,
under "The DESCRIPTION file", says the Title "should use title case"; the
--as-cran
incoming check flags one that does not. 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/title_case_bad.txt",
show_content = FALSE)
lab_title_case(pkg, verbose = FALSE)$issues
#> [1] "Title is not in title case. R would write it as: Summaries of Survey Weights"
unlink(pkg, recursive = TRUE)