build {devtools}R Documentation

Build package

Description

Building converts a package source directory into a single bundled file. If binary = FALSE this creates a tar.gz package that can be installed on any platform, provided they have a full development environment (although packages without source code can typically be installed out of the box). If binary = TRUE, the package will have a platform specific extension (e.g. .zip for windows), and will only be installable on the current platform, but no development environment is needed.

Usage

build(
  pkg = ".",
  path = NULL,
  binary = FALSE,
  vignettes = TRUE,
  manual = FALSE,
  args = NULL,
  quiet = FALSE,
  ...
)

Arguments

pkg

The package to use, can be a file path to the package or a package object. See as.package() for more information.

path

Path in which to produce package. If NULL, defaults to the parent directory of the package.

binary

Produce a binary (--binary) or source ( --no-manual --no-resave-data) version of the package.

vignettes, manual

For source packages: if FALSE, don't build PDF vignettes (--no-build-vignettes) or manual (--no-manual).

args

An optional character vector of additional command line arguments to be passed to ⁠R CMD build⁠ if binary = FALSE, or ⁠R CMD install⁠ if binary = TRUE.

quiet

if TRUE suppresses output from this function.

...

Additional arguments passed to pkgbuild::build.

Value

a string giving the location (including file name) of the built package

Note

The default manual = FALSE is not suitable for a CRAN submission, which may require manual = TRUE. Even better, use submit_cran() or release().


[Package devtools version 2.4.5 Index]