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

# \donttest{
## easily include these tables in Rmd files using knitr
path <- getSampleModules(tempdir())
sampleModules <- dir(path)

p <- moduleParams(sampleModules[3], path = path)
i <- moduleInputs(sampleModules[3], path = path)
o <- moduleOutputs(sampleModules[3], path = path)

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    |1         |0     |10    |time of initial fire ignition                                                                                                 |
#> |.plots           |character  |screen    |NA    |NA    |A modular mechanism to create plots, using png, screen device or other. See ?Plots.                                           |
#> |.plotInitialTime |numeric    |0         |0     |11    |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 |
#> |:----------|:-----------|:----|:---------|
#> |landscape  |SpatRaster  |NA   |NA        |
#> |NA         |numeric     |NA   |NA        |
knitr::kable(o)
#> 
#> 
#> |objectName |objectClass |desc |other |
#> |:----------|:-----------|:----|:-----|
#> |landscape  |SpatRaster  |NA   |NA    |
#> |NA         |numeric     |NA   |      |
# }