package.skeleton {utils} R Documentation

Create a Skeleton for a New Source Package

Description


package.skeleton automates some of the setup for a new source
package. It creates directories, saves functions, data, and
R code files to appropriate places, and creates skeleton help
files and a ‘Read-and-delete-me’ file describing further steps
in packaging.

Usage

package.skeleton(
    name = "anRpackage",
    path = "./",
    force = FALSE,
    code.files = NULL,
    encoding = "unknown",
    ... = NULL);

Arguments

name

character string: the package name and directory name for your package. Must be a valid package name. [as string]

path

path to put the package directory in. [as string]

force

If False will Not overwrite an existing directory. [as boolean]

code.files

a character vector with the paths to R code files to build the package around. See ‘Details’. [as string]

encoding

optionally a character string with an encoding for an optional Encoding: line in ‘DESCRIPTION’ when non-ASCII characters will be used; typically one of "latin1", "latin2", or "UTF-8"; see the WRE manual. [as string]

list

character vector naming the R objects to put in the package. Usually, at most one of list, environment, or code_files will be supplied. See ‘Details’. [as list]

environment

an environment where objects are looked for. See ‘Details’. [as Environment]

Details

The arguments list, environment, and code_files provide alternative ways to initialize the package. If code_files is supplied, the files so named will be sourced to form the environment, then used to generate the package skeleton. Otherwise list defaults to the objects in environment (including those whose names start with .), but can be supplied to select a subset of the objects in that environment. Stubs of help files are generated for functions, data objects, And S4 classes And methods, using the prompt, promptClass, And promptMethods functions. If an object from another package Is intended to be imported And re-exported without changes, the promptImport function should be used after package.skeleton to generate a simple help file linking to the original one. The package sources are placed In subdirectory name Of path. If code_files Is supplied, these files are copied; otherwise, objects will be dumped into individual source files. The file names In code_files should have suffix ".R" And be In the current working directory. The filenames created For source And documentation Try To be valid For all OSes known To run R. Invalid characters are replaced by _, invalid names are preceded by zz, names are converted To lower Case (To avoid Case collisions On Case-insensitive file systems) 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). Also, the code And help files should have names starting With an ASCII letter Or digit, And this Is checked And If necessary z prepended. Functions with names starting with a dot are placed in file 'R/name-internal.R’. When you are done, delete the 'Read-and-delete-me’ file, as it should not be distributed.

Authors

SMRUCC genomics Institute

Value

Used for its side-effects.

clr value class

Examples


[Package utils version 2.33.856.6961 Index]