moduleMetadata | R Documentation |
Parse and extract module metadata
moduleMetadata(
sim,
module,
path = getOption("spades.modulePath", NULL),
defineModuleListItems = c("name", "description", "keywords", "childModules", "authors",
"version", "spatialExtent", "timeframe", "timeunit", "citation", "documentation",
"reqdPkgs", "parameters", "inputObjects", "outputObjects")
)
## S4 method for signature 'missing,character,character'
moduleMetadata(module, path, defineModuleListItems)
## S4 method for signature 'missing,character,missing'
moduleMetadata(module, defineModuleListItems)
## S4 method for signature 'ANY,ANY,ANY'
moduleMetadata(
sim,
module,
path = getOption("spades.modulePath", NULL),
defineModuleListItems = c("name", "description", "keywords", "childModules", "authors",
"version", "spatialExtent", "timeframe", "timeunit", "citation", "documentation",
"reqdPkgs", "parameters", "inputObjects", "outputObjects")
)
sim |
A |
module |
Character string. Your module's name. |
path |
Character string specifying the file path to modules directory.
Default is to use the |
defineModuleListItems |
A vector of metadata entries to return values about. |
A list of module metadata, matching the structure in defineModule()
.
Alex Chubaty
defineModule()
## turn off code checking -- don't need it here
opts <- options("spades.moduleCodeChecks" = FALSE,
"spades.useRequire" = FALSE)
path <- getSampleModules(tempdir())
sampleModules <- dir(path)
x <- moduleMetadata(sampleModules[3], path = path)
## using simList
if (require("SpaDES.tools", quietly = TRUE)) {
mySim <- simInit(
times = list(start = 2000.0, end = 2001.0, timeunit = "year"),
params = list(
.globals = list(stackName = "landscape")
),
modules = list("caribouMovement"),
paths = list(modulePath = path)
)
moduleMetadata(sim = mySim)
}
# turn code checking back on -- don't need it here
options(opts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.