Visualize a stock-and-flow diagram using the R package DiagrammeR. Stocks are represented as boxes. Flows are represented as arrows between stocks and/or double circles, where the latter represent what it outside of the model boundary. Thin grey edges indicate dependencies between variables. By default, constants (indicated by italic labels) are not shown. Hover over the variables to see their equations.
sfm <- stockflow("SIR")
plot(sfm)
# Don't show constants or auxiliariesplot(sfm, show_constants = FALSE, show_aux = FALSE)
# Only show specific variablesplot(sfm, vars = "susceptible")