Learn R Programming

SpaDES (version 1.2.0)

newModule: Create new module from template.

Description

Autogenerate a skeleton for a new SpaDES module, a template for a documentation file, a citation file, a license file, a README.txt file, and a folder that contains unit tests information. The newModuleDocumentation will not generate the module file, but will create the other 4 files.

Usage

newModule(name, path, open, unitTests)
"newModule"(name, path, open, unitTests)
"newModule"(name, open, unitTests)
"newModule"(name, path, unitTests)
"newModule"(name, unitTests)
"newModule"(name, path, open)
"newModule"(name, open)
"newModule"(name, path)
"newModule"(name)
newModuleCode(name, path, open)
"newModuleCode"(name, path, open)
newModuleDocumentation(name, path, open)
"newModuleDocumentation"(name, path, open)
"newModuleDocumentation"(name, open)
"newModuleDocumentation"(name, path)
"newModuleDocumentation"(name)
newModuleTests(name, path, open)
"newModuleTests"(name, path, open)

Arguments

name
Character string. Your module's name.
path
Character string. Subdirectory in which to place the new module code file. The default is the current working directory.
open
Logical. Should the new module file be opened after creation? Default TRUE.
unitTests
Logical. Should the new module include unit test files? Default TRUE. Unit testing relies on the testthat package.

Value

Nothing is returned. The new module file is created at path/name.R, as well as ancillary files for documentation, citation, license, readme, and unit tests folder.

Details

All files will be created within a subfolder named name within the path.

Examples

Run this code
## Not run: 
#   ## create a "myModule" module in the "modules" subdirectory.
#   newModule("myModule", "modules")
# ## End(Not run)

Run the code above in your browser using DataLab