package.skeleton
Create a Skeleton for a New Source Package

Description

Creates a skeleton for a new package based on existing functions

Usage

package.skeleton(name = "aPackage", list = character(), 
	environment = .GlobalEnv, path = ".", force = FALSE, 
	code_files = character())

Arguments

name a character string specifying the name of package to be created.
list a character vector naming the objects in the new package. If missing, the character vector that lists the names of objects contained in environment is used.
environment an environment to find objects. The default is .GlobalEnv.
path a character string specifying the name of parent directory where the new package skeleton is created.
force a logical value. If TRUE, the package skeleton is forced to be created even it exists. If FALSE (the default), the function is stopped with a message.
code_files a character vector specifying the code file names. These files can be parsed and evaluated through sys.source, and copied to code directory of package.

Details

package.skeleton had the argument namespace=TRUE until Spotfire Enterprise Runtime for R version 2.5. The namespace argument was removed to match the removal of that argument in Open Source R 3.0.0. Now, package.skeleton always writes the file NAMESPACE in the package and never writes a help file for "for-internal-use-only" functions.
After you create a source package, you must install it.
Value
Returns nothing; creates a package skeleton in specified directory.
References
INSTALL. R Installation and Administration. R Project.
install.packages. R Installation and Administration. R Project.
Writing R Extensions. R Project.
See Also
ls, sys.source, dump, save, file.copy, promptPackage, prompt
Examples
## Not run: 
# Running these examples will create 2 source package directories
# in your current working directory.
fun1 <- function(x) { x^3+ 2*x+ 10}
fun2 <- function(y) { sin(y) + fun1(y)}

data1 <- ts(sin(1:100), freq=12, start=2014.25) data2 <- matrix(cos(1:20), nrow = 4)

package.skeleton(name = "Mypack", list = c("fun1", "fun2", "data1", "data2"))

package.skeleton(name = "Mypack1", list = c("fun1", "fun2", "data1", "data2"), force = TRUE) ## End(Not run)

Package utils version 6.1.4-13
Package Index