5 CBM_Core

5.1 Overview

NPP: Net primary productivity is for both above and below ground productivity. Provide an overview of what the module does / how to use the module.

Module documentation should be written so that others can use your module. This is a template for module documentation, and should be changed to reflect your module.

5.1.1 R Markdown

R Markdown syntax allows R code, outputs, and figures to be rendered in the documentation.

For help writing in R Markdown, see http://rmarkdown.rstudio.com/.

5.2 Usage

library(igraph)
library(SpaDES.core)

moduleDir <- file.path(".")
inputDir <- file.path(moduleDir, "inputs") %>% reproducible::checkPath(create = TRUE)
outputDir <- file.path(moduleDir, "outputs")
cacheDir <- file.path(outputDir, "cache")
times <- list(start = 1990.00, end = 1994.00)
parameters <- list(
  CBM_core = list(.useCache = ".inputObjects")
  #.progress = list(type = "text", interval = 1), # for a progress bar
  ## If there are further modules, each can have its own set of parameters:
  #module1 = list(param1 = value1, param2 = value2),
  #module2 = list(param1 = value1, param2 = value2)
)
modules <- list("CBM_core")
objects <- list()
paths <- list(
  cachePath = cacheDir,
  modulePath = moduleDir,
  inputPath = inputDir,
  outputPath = outputDir
)

myCore <- simInit(times = times, params = parameters, modules = modules,
                 objects = objects, paths = paths)

outCore <- spades(myCore, debug = TRUE)

5.3 Events

Describe what happens for each event type.

5.3.1 Plotting

Write what is plotted.

5.3.2 Saving

Write what is saved.

5.4 Data dependencies

5.4.1 Input data

How to obtain input data, and a description of the data required by the module. If sourceURL is specified, downloadData("CBM_core", "path/to/modules/dir") may be sufficient.

5.4.2 Output data

Description of the module outputs.