Learn R Programming

SpaDES (version 1.3.1)

moduleMetadata: Parse and extract module metadata

Description

Parse and extract module metadata

Usage

moduleMetadata(module, path, sim)

# S4 method for character,character,ANY 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

Run this code
# NOT RUN {
path <- system.file(package = "SpaDES", "sampleModules")
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", burnStats = "nPixelsBurned")
   ),
   modules = list("randomLandscapes", "fireSpread", "caribouMovement"),
   paths = list(modulePath = system.file("sampleModules", package = "SpaDES"))
)
moduleMetadata(sim = mySim)

# }

Run the code above in your browser using DataLab