roxygen_and_build: Roxygenize a package, clean up and build/check the package

View source: R/build.R

roxygen_and_buildR Documentation

Roxygenize a package, clean up and build/check the package

Description

After the source package is roxygenized, this function will build the package. Optionally it also installs or checks the package, reformats the code in the example sections. Note rab is an alias of roxygen_and_build.

Usage

roxygen_and_build(
  pkg,
  build = TRUE,
  build.opts = "--no-manual",
  install = FALSE,
  install.opts = if (build) "" else "--with-keep.source",
  check = FALSE,
  check.opts = "--as-cran --no-manual",
  remove.check = TRUE,
  reformat = TRUE,
  before = NULL,
  ...
)

rab(
  pkg,
  build = TRUE,
  build.opts = "--no-manual",
  install = FALSE,
  install.opts = if (build) "" else "--with-keep.source",
  check = FALSE,
  check.opts = "--as-cran --no-manual",
  remove.check = TRUE,
  reformat = TRUE,
  before = NULL,
  ...
)

Arguments

pkg

the root directory of the source package

build

whether to build the package

build.opts

options to be passed to R CMD build

install

whether to install the package

install.opts

options to be passed to R CMD INSTALL

check

whether to check the package

check.opts

options to check the package (e.g. "--no-examples")

remove.check

whether to remove the directory generated by R CMD check

reformat

whether to reformat the example code; see reformat_code

before

an R expression to be evaluated under the package root directory before the package is roxygenized and built

...

other arguments passed to roxygenize

Value

NULL

Author(s)

Yihui Xie <http://yihui.org>

Examples

## Not run: 
roxygen_and_build("Rd2roxygen", install = TRUE)
## or simply
rab("Rd2roxygen", install = TRUE)

## End(Not run)

yihui/Rd2roxygen documentation built on March 16, 2024, 1:29 p.m.