SpaDES (version 1.2.0)

newModule: Create new module from template.


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.


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)
newModuleCode(name, path, open)
"newModuleCode"(name, path, open)
newModuleDocumentation(name, path, open)
"newModuleDocumentation"(name, path, open)
"newModuleDocumentation"(name, open)
"newModuleDocumentation"(name, path)
newModuleTests(name, path, open)
"newModuleTests"(name, path, open)


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


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.


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


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 DataCamp Workspace