SpaDES (version 1.3.1)

shine: Display a simple, interactive shiny app of the simList

Description

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 NAs 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.

Usage

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 console.

filesOnly

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

...

additional arguments. Currently not used

Examples

Run this code
# NOT RUN {
 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"))
 )

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)
# }

Run the code above in your browser using DataLab