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: '.useCache' is not of specified type 'logical'.
#> defineParameter: '.plotInitialTime' is not of specified type 'numeric'.
#> defineParameter: '.useCache' is not of specified type 'logical'.
i <- moduleInputs(sampleModules[3], path = path)
#> defineParameter: '.useCache' is not of specified type 'logical'.
#> defineParameter: '.plotInitialTime' is not of specified type 'numeric'.
#> defineParameter: '.useCache' is not of specified type 'logical'.
o <- moduleOutputs(sampleModules[3], path = path)
#> defineParameter: '.useCache' is not of specified type 'logical'.
#> defineParameter: '.plotInitialTime' is not of specified type 'numeric'.
#> defineParameter: '.useCache' is not of specified type 'logical'.
#' \dontrun{ ## easily include these tables in Rmd files using knitr knitr::kable(p)
#> #> #> |paramName |paramClass |default |min |max |paramDesc | #> |:----------------|:----------|:----------|:----------|:-----|:-----------------------------------------------------------------------------------------------------------------------------| #> |inRAM |logical |FALSE |TRUE |FALSE |should the raster be stored in memory? | #> |nx |numeric |100 |10 |500 |size of map (number of pixels) in the x dimension | #> |ny |numeric |100 |10 |500 |size of map (number of pixels) in the y dimension | #> |stackName |character |landscape |NA |NA |name of the RasterStack | #> |.plotInitialTime |numeric |start(sim) |start(sim) |NA |time to schedule first plot event | #> |.plotInterval |numeric |NA |NA |NA |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. | #> |.useCache |logical |FALSE |init, plot |NA |should the module result be cached for future use |
knitr::kable(i)
#> #> #> |objectName |objectClass |desc |sourceURL |other | #> |:----------|:-----------|:----|:---------|:-----| #> |NA |NA |NA |NA |NA |
knitr::kable(o)
#> #> #> |objectName |objectClass |desc |other | #> |:----------------------------------------------------------|:-----------|:----|:-----| #> |SpaDES.core::P(sim, module = "randomLandscapes")$stackName |RasterStack |NA |NA |
#' }