Talk:NutriTools.R

From Organic Design wiki
Revision as of 02:54, 12 March 2007 by Sven (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Details

The structure of this category and subcategories is very consise. It is based on the build process of the R function package.skeleton which is used to create a contributed package template.

  • Names of articles correspond to filenames for the package builds
  • Subcategories of this package are in the same structure as the package directory structure

Developers

Build process

Download the text file contents of NutriTools.R into a temporary directory. In R, using that directory as your working directory, create a skeleton from a list of functions in a working .RData directory;

rm(list=ls())
source("NutriTools.R")
package.skeleton(name="NutriTools", force=TRUE)
buildMan     <- "NutriTools/man"
buildManDest <- "man_build" 
myManPages   <- "man"
# Copy build man pages to buildManDest directory
for( i in dir(buildMan)) {
  print(i)
  file.copy(from=file.path(buildMan, i), to=file.path(buildManDest,i), overwrite=FALSE)
}
# Copy my new man pages to build directory
for( i in dir(myManPages, pattern="[[:alpha:]]$")) {
  print(i)
  file.copy(from=file.path(myManPages, i), to=file.path(buildMan,i), overwrite=TRUE)
}

To build and install the R Package, the following commands are run In the filesystem parent directory of the R Package.

R CMD build NutriTools
R CMD check NutriTools
R CMD INSTALL NutriTools_[VERSION].tar.gz