checkRd
Check an Rd File for Issues

Description

This function checks an Rd document for common issues.

Usage

checkRd(Rd, defines = .Platform$OS.type, stages = "render",
        unknownOK = TRUE, listOK = TRUE, ..., def_enc = FALSE)

## S3 method for class 'checkRd': print(x, minlevel = -Inf, ...)

Arguments

Rd a character string or an object of class "Rd".
defines character vector describing what #ifdef conditions should be included.
stages character vector describing the stages ("build", "install", or "render") at which \Sexpr macros should be processed.
unknownOK logical value, if TRUE, report an issue when an unrecognized macro is encountered. If FALSE, emit a warning when an unrecognized macro is encountered.
listOK logical value, if TRUE, report an issue when unnecessary non-empty braces are encountered. If FALSE, emit a warning when such braces are encountered.
... additional arguments to be passed to parse_Rd.
def_enc logical value, if FALSE, report an issue when non-ASCII text is encountered in a document that does not declare an \encoding macro.
x object of class "checkRd".
minlevel a numeric value specifying the minimum issue level to print.
Value
an object of class "checkRd", composed of a character vector of issue messages. Each issue contains the function responsible for identifying the issue, a severity level of the issue, the location of the issue in the document, and a description of the issue itself.
print.checkRd is a generic method of class "checkRd" for printing.
See Also
parse_Rd
Examples
## Not run: 
library("tools")
doc <- parse_Rd(file.path(R.home(), "src/library/tools/man/checkRd.Rd"))
result <- checkRd(doc)
print(result, minlevel = 5)

## End(Not run)
Package tools version 6.0.0-69
Package Index