plotPostprocessedEnvs {babsim.hospital}R Documentation

plotPostprocessedEnvs

Description

Plot output from postprocessEnvs.

Usage

plotPostprocessedEnvs(results)

Arguments

results

Results from postprocessEnvs.

Value

This function returns a ggplot object.

Examples

set.seed(123)
# 1. Generate simulation data based on number of infected persons per day:
x <- dataCovidBeds20200624
StartDate <- x$Day[1]
EndDate <- x$Day[length(x$Day)]
arrivalTimes <- getArrivalTimes(x$Infected)
para <- babsimHospitalPara()
conf <- babsimToolsConf()
y <- babsimHospital(
  arrivalTimes = arrivalTimes,
  conf = conf,
  para = para
)

# 2. Postprocess simmer environment:
res <- postprocessEnvs(envs = y, StartDate = "2020-03-03")
# 4. Plot results
p <- plotPostprocessedEnvs(res)
# print(p)

[Package babsim.hospital version 11.8.4 Index]