Parse and extract module metadata

moduleMetadata(module, path, sim)

# S4 method for character,character,missing
moduleMetadata(module, path)

# S4 method for character,missing,missing
moduleMetadata(module)

# S4 method for ANY,missing,simList
moduleMetadata(module, sim)

Arguments

module

Character string. Your module's name.

path

Character string specifying the file path to modules directory. Default is to use the spades.modulePath option.

sim

A simList simulation object, generally produced by simInit.

Value

A list of module metadata, matching the structure in defineModule.

See also

defineModule

Examples

# NOT RUN {
path <- system.file("sampleModules", package = "SpaDES.core")
sampleModules <- dir(path)
x <- moduleMetadata(sampleModules[3], path)

# using simList
mySim <- simInit(
   times = list(start = 2000.0, end = 2002.0, timeunit = "year"),
   params = list(
     .globals = list(stackName = "landscape")
   ),
   modules = list("caribouMovement"),
   paths = list(modulePath = system.file("sampleModules", package = "SpaDES.core"))
)
moduleMetadata(sim = mySim)
# }