packageSetup {XR} | R Documentation |
Execute a Setup Step for a Package
Description
The R code in one or more files is evaluated to carry out setup computations that will
write some code, documentation or anything else into the source directory of an R package.
Designed for package authors who want to use techniques such as the proxy classes in the
XR set of interfaces, compileAttributes()
in Rcpp or inline documentation in roxygen2.
Usage
packageSetup(file = "setup.R", dir = ".", needPackage = TRUE)
Arguments
file |
The name of the files to be parsed and evaluated for the setup step, by default,
|
dir |
Optional directory to use as the working directory for the evaluation. By default the current working directory should be the source directory for the package. |
needPackage |
The package for which the setup is intended. Not needed if the working
directory (either currently or given by |
Details
The computations will be carried out in an environment constructed bypackageSetup()
with the namespace of the package as its parent, and a .packageName
object to
associate it with the package. By default, the setup step looks for the DESCRIPTION
file in the
working directory to find the package name. The package must have been installed in the
library path of this R session.