Description Usage Arguments Note Examples
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.
1 2 3 4 5 6 |
sim |
A |
title |
character string. The title of the shiny page. |
debug |
Logical. If |
filesOnly |
Logical. If |
... |
additional arguments. Currently not used |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.