add_module | R Documentation |
This is the workhorse of {SIAtools}
package. The function checks if the
package is properly configured for SIA modules and provides immediate fixes
as needed. add_module()
automatically puts a correct entry in SIA Modules
Manifest of your package (which is created if not already present), and
prepares .R
file with the code template. Both files are automatically
opened for you by default.
add_module(
name = "new_module",
title = NULL,
category = NULL,
open = TRUE,
prefix = "sm_",
proj = curr_proj()
)
name |
character, a name for the new SIA module. |
title |
character, new module's title. You can leave the default
|
category |
character, new module's category. The category dictates the
tab within the |
open |
Whether to open the manifest and module's source for interactive
editing. Defaults to |
prefix |
character, a prefix to denote SIA module. It's highly
recommended to stick with the default |
proj |
character, a path to the project. Defaults to current project. |
No return value. Called for the side effects.
Other module management functions:
get_modules()
,
preview_module()
,
remove_module()
## Not run:
# add the module called "test" and edit the details later on in the YAML
add_module("test")
# specify the title and category at creation time
add_module("test", title = "Test module", category = "Validity")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.