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

Description Usage Arguments Note Examples

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

1
2
3
4
5
shine(sim, title = "SpaDES App", debug = FALSE, filesOnly = FALSE, ...)

## S4 method for signature '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

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 overlayed layers is ignored.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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)

## End(Not run)

SpaDES documentation built on May 19, 2017, 2:09 p.m.

Search within the SpaDES package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.