Skip to content

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 roxygen roclets option, which defaults to c("collate", "namespace", "rd"). This will update (if needed) the Collate field with update_collate(), produce the NAMESPACE file with namespace_roclet(), and produce the Rd files with rd_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 the load roxygen option, which defaults to load_pkgload(). See load for more details.

clean

If TRUE, roxygen will delete all files previously created by roxygen before running each roclet.

Value

NULL

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.