View source: R/plotDailyMaxResults.R
plotDailyMaxResults | R Documentation |
Plot output from getDailyMax()
.
plotDailyMaxResults( results, labels = c("babsim", "DIVI"), title = "Betten: Tuerkis = Readfssldaten, Rot = Simulation", showBeds = FALSE, icuDataRegion = NULL )
results |
Results from |
labels |
Axes labels (vector). Default: |
title |
Title. Default:
|
showBeds |
should normal beds be shown in the plot? |
icuDataRegion |
regional |
This function returns a ggplot
object.
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. Extract real data: fieldEvents <- getRealBeds( data = babsim.hospital::dataCovidBeds20200624, resource = c("bed", "intensiveBed", "intensiveBedVentilation") ) conf <- babsimToolsConf() # 3. Combine simlated and real data: res <- getDailyMaxResults( envs = y, fieldEvents = fieldEvents, conf = conf ) # 4. Plot results p <- plotDailyMaxResults(res) # print(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.