roxygenize: Process a package with the Rd, namespace and collate roclets.

Description Usage Arguments Details Value

View source: R/roxygenize.R

Description

This is the workhorse function that uses roclets, the built-in document tranformation functions, to build all documentation for a package. See the documentation for the individual roclets, rd_roclet, namespace_roclet, and for update_collate, for more details.

Usage

1
2
3
4
5
roxygenize(package.dir = ".", roclets = NULL, load_code = source_package,
  clean = FALSE)

roxygenise(package.dir = ".", roclets = NULL, load_code = source_package,
  clean = FALSE)

Arguments

package.dir

Location of package top level directory. Default is working directory.

roclets

Character vector of roclet names to use with package. This defaults to NULL, which will use the roclets fields in the list provided in the Roxygen DESCRIPTION field. If none are specified, defaults to c("collate", "namespace", "rd").

load_code

A function used to load all the R code in the package directory. It is called with the path to the package, and it should return an environment containing all the sourced code.

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 using by inspecting loaded objects in the package. This means that you must be able to load the package in order to document it. source_package provides a simple simulation of package loading that works if you only have R files in your package. For more complicated packages, I recommend using devtools::document which does a much better job at simulating package install and load.

Value

NULL


johnmchambers/roxygen2 documentation built on May 18, 2017, 5:10 a.m.