inspect_Rd: Inspect and update an Rd object or file

Description Usage Arguments Details Author(s)


Inspect and update an Rd object or file.


inspect_Rd(rdo, package = NULL)

inspect_Rdfun(rdo, alias_update = TRUE)

inspect_Rdmethods(rdo, package = NULL)




an Rd object or file name


name of a package


if TRUE, add missing alias entries for functions with usage statements.


These functions check if the descriptions of the objects in rdo are consistent with their current definitions and update them, if necessary. The details depend on the type of the documented topic. In general, the functions update entries that can be produced programmatically, possibly accompanied with a suggestion to the author to write some additional text.

inspect_Rd checks the \name section of rdo and dispatches to one of the other inspect_XXX functions depening on the type of the topic.

inspect_Rdfun processes documentation of functions. It checks the usage entries of all functions documented in rdo and updates them if necessary. It appends "\alias" entries for functions that do not have them. Entries are created for any arguments that are missing from the "\arguments" section. Warning is given for arguments in the "\arguments" section that are not present in at least one usage entry. inspect_Rdfun understands the syntax for S3 methods and S4 methods used in "usage" sections, as well.

inspect_Rdmethods checks and updates documentation of an S4 generic function.

inspect_Rdclass checks and updates documentation of an S4 class.

Since method signatures and descriptions may be present in documentation of a class, as well as in that of methods, the question arises where to put "\alias" entries to avoid duplication. Currently, alias entries are put in method descriptions.


Georgi N. Boshnakov

Search within the Rdpack package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.