Create a Package Directory from a Template
Create a package directory from a template, with symbol-value substitution
createPackage(pkgname, destinationDir, originDir, symbolValues, unlink=FALSE, quiet=FALSE)
pkgname |
Character. The name of the package to be written. |
destinationDir |
Character. The path to a directory where the package is to be written. |
originDir |
Character. The path to a directory that contains
the template package. Usually, this will contain a file named
|
symbolValues |
Named list of character strings. The symbol-to-value
mapping. See
|
unlink |
Logical. If |
quiet |
Logical. If |
The intended use of this function is for the automated mass production of data packages, such as the microarray annotation, CDF, and probe sequence packages.
No syntactic or other checking of the package is performed. For this, use R CMD check.
The symbols @PKGNAME@
and @DATE@
are automatically
defined with the values of pkgname
and date()
, respectively.
The function returns a list
with one element
pkgdir
: the path to the package.
Wolfgang Huber http://www.dkfz.de/mga/whuber
copySubstitute
,
the reference manual Writing R extensions.
sym = list(AUTHOR = "Hesiod", VERSION = "1.0", TITLE = "the nine muses", FORMAT = "Character vector containg the names of the 9 muses.") res = createPackage("muses", destinationDir = tempdir(), originDir = system.file("Code", package="Biobase"), symbolValues = sym, unlink = TRUE, quiet = FALSE) muses = c("Calliope", "Clio", "Erato", "Euterpe", "Melpomene", "Polyhymnia", "Terpsichore", "Thalia", "Urania") dir.create(file.path(res$pkgdir, "data")) save(muses, file = file.path(res$pkgdir, "data", "muses.rda")) res$pkgdir
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.