moduleVersion | R Documentation |
Parse and extract a module's version
moduleVersion(module, path, sim, envir = NULL)
## S4 method for signature 'character,character,missing'
moduleVersion(module, path, envir)
## S4 method for signature 'character,missing,missing'
moduleVersion(module, envir)
## S4 method for signature 'character,missing,simList'
moduleVersion(module, sim, envir)
module |
Character string. Your module's name. |
path |
Character string specifying the file path to modules directory.
Default is to use the |
sim |
A |
envir |
Optional environment in which to store parsed code. This may be
useful if the same file is being parsed multiple times. This
function will check in that environment for the parsed file before
parsing again. If the |
numeric_version
indicating the module's version.
Alex Chubaty
moduleMetadata()
# using filepath
path <- getSampleModules(tempdir())
moduleVersion("caribouMovement", path)
# using simList
options("spades.useRequire" = FALSE)
if (require("SpaDES.tools", quietly = TRUE)) {
mySim <- simInit(
times = list(start = 2000.0, end = 2002.0, timeunit = "year"),
params = list(
.globals = list(stackName = "landscape", burnStats = "nPixelsBurned")
),
modules = list("caribouMovement"),
paths = list(modulePath = path)
)
moduleVersion("caribouMovement", sim = mySim)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.