This is the workhorse function that builds manual pages and metadata for a
package. It is powered by roclets, roxygen2's plugin system for
producing different types of output. See the documentation of the
individual components (rd_roclet(), namespace_roclet(),
update_collate()) for more details, or learn how to make your own in
vignette("extending").
Usage
roxygenize(package.dir = ".", roclets = NULL, load_code = NULL, clean = FALSE)
roxygenise(package.dir = ".", roclets = NULL, load_code = NULL, clean = FALSE)Arguments
- package.dir
Location of package top level directory. Default is working directory.
- roclets
Character vector of roclets to use.
The default,
NULL, uses the roxygenrocletsoption, which defaults toc("collate", "namespace", "rd"). This will update (if needed) theCollatefield withupdate_collate(), produce theNAMESPACEfile withnamespace_roclet(), and produce the Rd files withrd_roclet().(Note that
update_collate()is not technically a roclet but is still controlled with this argument for historical reasons.)- load_code
A function used to load all the R code in the package directory. The default,
NULL, uses the strategy defined by theloadroxygen option, which defaults toload_pkgload(). See load for more details.- clean
If
TRUE, roxygen will delete all files previously created by roxygen before running each roclet.
Details
Note that roxygen2 is a dynamic documentation system: it works by inspecting loaded objects in the package. This means that you must be able to load the package in order to document it: see load for details.
