packageAdd: Add contents of R source files to a source package

Description Usage Arguments Details Value See Also Examples

Description

The contents of one or more files of R source code will be added to the specified source package: the files themselves will be added to the R directory, and shells for the documentation will be added to the man directory. Unlike package.skeleton, this function does not require one function per source file and supports both class and method definitions.

Usage

1
packageAdd(pkg, files, path = ".", document = TRUE)

Arguments

pkg

The name of the package. It must be attached to the session.

files

The names of the files containing the R source to add to the package.

path

The directory under which the source for pkg is stored.

document

Should a skeleton documentation for the objects be generated?

Details

The file of source code is copied unchanged to the "R" subdirectory of the source package. A shell of documentation is initialized for all the objects created by the evaluating the file.

If the file generates several function objects, the documentation shells for all of these, as generated by the prompt() function, are merged and stored under the name of the file, suffix ".Rd", in the "man" subdirectory of the package.

Currently method and class documentation are generated on separate files rather than being merged with function documentation.

Value

Nothing useful. Called for its side effects.

See Also

promptAll

Examples

1
2
3
4
## Not run: 
packageAdd("SoDA", "triDiagonal.R", "~/RPackage")

## End(Not run)

SoDA documentation built on Oct. 28, 2020, 9:07 a.m.