Currently, this is quite simple. It creates a side bar with the simulation times, plus a set of tabs, one for each module, with numeric sliders. Currently, this does not treat NA correctly. Also, it is slow (shiny is not built to be fast out of the box). There are two buttons, one to run the entire spades call, the other to do just one time step at a time. It can be repeatedly pressed.

shine(sim, title = "SpaDES App", debug = FALSE, filesOnly = FALSE,
  ...)

# S4 method for simList
shine(sim, title = "SpaDES App", debug = FALSE,
  filesOnly = FALSE, ...)

Arguments

sim

A simList object

title

character string. The title of the shiny page.

debug

Logical. If TRUE, then will show spades event debugger in the console.

filesOnly

Logical. If TRUE, then the server.R, ui.R files will be written to a temporary location, with a message indicating where they are. Publishing this to https://shinyapps.io is currently very buggy, and will likely not work as desired.

...

additional arguments. Currently not used

Note

Many module parameters are only accessed by modules at the start of a model run. So, even if the user changes them mid run, there won't be an effect on the model runs until Reset is pressed, and one of the Run buttons is pressed.

.plotInterval changes will only affect plots that are the base layer of a given plot image. If there are layers on top of a base layer (e.g., an agent on top of a raster layer), the .plotInterval of the overlaid layers is ignored.

Examples

if (FALSE) { library(SpaDES) library(SpaDES.shiny) mySim <- simInit( times <- list(start = 0.0, end = 20.0), params = list( .globals = list(stackName = "landscape", burnStats = "nPixelsBurned") ), modules = list("randomLandscapes", "fireSpread", "caribouMovement"), paths = list(modulePath = system.file("sampleModules", package = "SpaDES.core")) ) shine(mySim) # To publish to shinyapps.io, need files. This is not reliable yet. shine(mySim, filesOnly = TRUE) # if the user wants to see the events go by, which can help with debugging: shine(mySim, debug = TRUE) }