These are more or less wrappers around moduleMetadata, with the exception that extraneous spaces and End-Of-Line characters will be removed from the desc arguments in defineParameters, defineInputs, and defineOutputs

moduleParams(module, path)

# S4 method for character,character
moduleParams(module, path)

moduleInputs(module, path)

# S4 method for character,character
moduleInputs(module, path)

moduleOutputs(module, path)

# S4 method for character,character
moduleOutputs(module, path)

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.

Value

data.frame

See also

Author

Alex Chubaty

Examples

path <- system.file("sampleModules", package = "SpaDES.core")
sampleModules <- dir(path)

p <- moduleParams(sampleModules[3], path = path)
#> defineParameter: 'startTime' is not of specified type 'numeric'.
#> defineParameter: '.plotInitialTime' is not of specified type 'numeric'.
i <- moduleInputs(sampleModules[3], path = path)
#> defineParameter: 'startTime' is not of specified type 'numeric'.
#> defineParameter: '.plotInitialTime' is not of specified type 'numeric'.
o <- moduleOutputs(sampleModules[3], path = path)
#> defineParameter: 'startTime' is not of specified type 'numeric'.
#> defineParameter: '.plotInitialTime' is not of specified type 'numeric'.

#' \dontrun{
## easily include these tables in Rmd files using knitr
knitr::kable(p)
#> 
#> 
#> |paramName        |paramClass |default      |min        |max          |paramDesc                                                                                                                     |
#> |:----------------|:----------|:------------|:----------|:------------|:-----------------------------------------------------------------------------------------------------------------------------|
#> |stackName        |character  |landscape    |NA         |NA           |name of the RasterStack                                                                                                       |
#> |nFires           |numeric    |10           |1          |100          |number of fires to initiate                                                                                                   |
#> |its              |numeric    |1e+06        |1e+06      |1e+06        |number of iterations for fire spread                                                                                          |
#> |persistprob      |numeric    |0            |0          |1            |probability of fire persisting in a pixel                                                                                     |
#> |returnInterval   |numeric    |1            |1          |1            |fire return interval                                                                                                          |
#> |spreadprob       |numeric    |0.225        |0.05       |0.5          |probability of fire spreading into a pixel                                                                                    |
#> |startTime        |numeric    |start(si.... |0          |end(sim)     |time of initial fire ignition                                                                                                 |
#> |.plotInitialTime |numeric    |start(sim)   |start(sim) |end(sim) + 1 |time to schedule first plot event                                                                                             |
#> |.plotInterval    |numeric    |1            |1          |1            |time interval between plot events                                                                                             |
#> |.saveInitialTime |numeric    |NA           |NA         |NA           |time to schedule first save event                                                                                             |
#> |.saveInterval    |numeric    |NA           |NA         |NA           |time interval between save events                                                                                             |
#> |.seed            |list       |             |NA         |NA           |Named list of seeds to use for each event (names). E.g., `list('init' = 123)` will `set.seed(123)` for the `init` event only. |
knitr::kable(i)
#> 
#> 
#> |objectName                                           |objectClass |desc |sourceURL |
#> |:----------------------------------------------------|:-----------|:----|:---------|
#> |SpaDES.core::P(sim, module = "fireSpread")$stackName |RasterStack |NA   |NA        |
#> |SpaDES.core::globals(sim)$burnStats                  |numeric     |NA   |NA        |
knitr::kable(o)
#> 
#> 
#> |objectName                                           |objectClass |desc |other |
#> |:----------------------------------------------------|:-----------|:----|:-----|
#> |SpaDES.core::P(sim, module = "fireSpread")$stackName |RasterStack |NA   |NA    |
#> |SpaDES.core::globals(sim)$burnStats                  |numeric     |NA   |NA    |
#' }