Utilities for Building and Checking Add-on Packages
Utilities for checking whether the sources of an R add-on package work correctly, and for building a source package from them.
a list of names of directories with sources of R
add-on packages. For
further options to control the processing, or for obtaining information about usage and version of the utility.
R CMD check
checks R add-on packages from their sources, performing a wide
variety of diagnostic checks.
R CMD build builds R source tarballs. The name(s) of the
packages are taken from the ‘DESCRIPTION’ files and not from the
directory names. This works entirely on a copy of the supplied source
foo --helpto obtain usage information on utility
foo. The defaults for some of the options to
R CMD buildcan be set by environment variables _R_BUILD_RESAVE_DATA_ and _R_BUILD_COMPACT_VIGNETTES_: see ‘Writing R Extensions’. Many of the checks in
R CMD checkcan be turned off or on by environment variables: see Chapter 6 of the ‘R Internals’ manual. By default
R CMD builduses the
tarto prepare the tarball. An external
tarprogram can be specified by the R_BUILD_TAR environment variable. This may be substantially faster for very large packages, and can be needed for packages with long path names (over 100 bytes) or very large files (over 8GB): however, the resulting tarball may not be portable.
R CMD checkby default unpacks tarballs by the internal
untarfunction: if needed an external
tarcommand can be specified by the environment variable R_INSTALL_TAR: please ensure that it can handle the type of compression used on the tarball. (This is sometimes needed for tarballs containing invalid or unsupported sections, and can be faster on very large tarballs. Setting R_INSTALL_TAR to tar.exe has been needed to overcome permissions issues on some Windows systems.)
The sections on “Checking and building packages” and “Processing Rd format” in “Writing R Extensions” (see the ‘doc/manual’ subdirectory of the R source tree).