use_module: Create and setup a module folder.

Description Usage Arguments Examples

View source: R/usethis.R

Description

This function creates a new module inside the modules folder of an active r project. If the 'modules' folder doesn't exist it will create it then adds a new folder with the name as specified in the name argument inside the 'modules' folder. R scripts to be used across the module will be added which contain the following:

Since dymium modules use the 'modules' and 'checkmate' packages, if these packages are not installed the function will ask whether you would like to install them or not.

Note that, to add event functions to a module see use_event.

Usage

1

Arguments

name

Name of the module.

Examples

1
2
3
4
5
6
## Not run: 
# Note: running this will create a folder called "modules" and a sub-folder
#       to your working directory within the folder called "demography"
use_module(name = "demography")

## End(Not run)

dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.