my.package.skeleton {utilitiesR}R Documentation

Create a skeleton for a new source package

Description

Create a skeleton for a new source package

Usage

  my.package.skeleton(packageName, path = ".",
    build.dir = "bin", hg = FALSE, hg.commit = hg,
    force = FALSE, empty = FALSE, version = "0.1", ...)

Arguments

packageName

name of the package (and).

build.dir

name of directory to dump built package in (default 'bin').

hg

boolean, whether to set this up as a mercurial project (initialises the project in mercurial)

hg.commit

whether to do an initial commit of the mercurial repo

empty

boolean, whether to create an entirely empty package (ie ignores list and env arguments).

path

path that the entire project directory will be *placed in*.

version

starting version of package, string ('0.1'): put into DESCRIPTION file.

force

boolean, whether to *REMOVE AND WRITE OVER* existing directories

...

passed to package.skeleton

Details

The difference between this and the base package.skeleton is that this sets up the project like so:

 path |- packageName-package The "project"
  directory |- Makefile A makefile for compiling various
  bits |- README A readme for the developer |- build.dir
  The output directory things are built in |- packageName
  The actual R package directory |- R |- inst ... etc
  (packages created by R's built-in |- man
  'package.skeleton' function). 
The in-built package.skeleton function only creates the internal 'packageName' directory. This version sets up the package in an environment more suited to a developer, with a handy Makefile to generate documentation ('make doc'), generate the package ('make' or 'make package'), check the package ('make check'), and/or install it ('make install'). It also separates source code (in the packageName dir) from the build and check outputs (in the build.dir dir). If the mercurial versioning system is installed on the system, it can optionally create a mercurial repository for the project, with a pre-generated .hgignore file which ignores generated files like everything in build.dir, Rd files, etc. The Makefile contains the targets 'doc' (to build documentation using the roxygen2 package), 'package' (to build the package using R CMD BUILD), 'check' (to check the package with R CMD CHECK), and 'install' (to install the package with R CMD INSTALL).

Examples

## Not run: 
my.package.skeleton('newPackage',hg=TRUE)

## End(Not run)

[Package utilitiesR version 1.6.2 Index]