generate_ggplot {DSAIRM} | R Documentation |
A helper function that takes simulation results and produces ggplot plots
Description
This function generates plots to be displayed in the Shiny UI. This is a helper function. This function processes results returned from the simulation, supplied as a list.
Usage
generate_ggplot(res)
Arguments
res |
A list structure containing all simulation results that are to be plotted.
The length of the main list indicates the number of separate plots to make.
Each list entry is itself a list, and corresponds to one plot and
needs to contain the following information/elements: |
Details
This function can be called to produce plots, i.e. those displayed for each app.
The input needed by this function is produced by either calling the run_model
function (as done when going through the UI)
or manually transforming the output from a simulate_ function into the correct list structure as explained here.
Value
A ggplot plot structure for display in a Shiny UI.
Author(s)
Andreas Handel