package.skeleton {utils}R Documentation

Create a skeleton for a new package

Description

package.skeleton automates some of the setup for a new package. It creates directories, saves functions and data to appropriate places, and creates skeleton help files and ‘README’ files describing further steps in packaging.

Usage

package.skeleton(name = "anRpackage", list, environment = .GlobalEnv, 
                 path = ".", force = FALSE)

Arguments

name character string: the directory name for your package.
list character vector naming the R objects to put in the package
environment if list is omitted, the contents of this environment are packaged.
path path to put the package directories in.
force If FALSE will not overwrite an existing directory.

Details

This tries to create filenames valid for all OSes known to run R. Invalid characters are replaced by _, invalid names are preceeded by zz, and finally the converted names are made unique by make.unique(sep = "_"). This can be done for code and help files but not data files (which are looked for by name).

Value

used for its side-effects.

References

Read the Writing R Extensions manual for more details

See Also

prompt, install.packages

Examples

## Not run: 
    f <- function(x,y) x+y
    g <- function(x,y) x-y
    d <- data.frame(a=1,b=2)
    e <- rnorm(1000)
    package.skeleton(list=c("f","g","d","e"), name="AnExample")
## End(Not run)

[Package utils version 2.0.0 Index]