View source: R/getConfFromData.R
| getConfFromData | R Documentation |
Generate a configuration list for babsimTools based on the data file and the
vector of resources.
This function returns the default configuration settings of the babsimTools functions
used to run babsimHospital.
getConfFromData(conf, simData, fieldData)
conf |
Configuration. Default: |
simData |
Simulation data. Default: |
fieldData |
Field (real) data. Default: |
Configuration conf is a list of the following settings.
seed(int) Initial seed. Default: 123
simRepeats(int) Number of simmer simulation runs. Default: 1
parallel(logical) Use parallel simulations based on mclapply. Default: FALSE
perCores(num) Percentage of cores used, if parallel == TRUE. Default: 0.5
ICU(logical) Use ICU (RKI) data. Default: FALSE.
logLevel(int) 0 = no logging, >= 1 logging. Default: 0. If larger than 10, shown detailed simmer output.
maxCapacity(num) Maximum capacity used for babsimHospital resources. Default: 1e6.
dataset(chr) 'GA' or 'ICU'. Default: 'GA'.
simulationDatesList with the following entries:
StartDate(chr) Start date of the simulation data (infection data used to generate arrival times), first day. Default: '2020-03-03'
EndDate(chr) End date of the simulation data, last day. Default: '2020-06-24'
fieldDatesList with the following entries:
StartDate(chr) Start date of the field (resources) data, first day. Default: '2020-03-03'
EndDate(chr) End date of the field data, last day. Default: '2020-06-24'
simulationData(data frame) Data used for the simulation. Default dataCovidBeds20200624
int 2 2 3 3 3 3 3 3 4 4 ...
int 0 0 0 0 0 0 0 0 0 0 ...
int 0 0 0 0 0 0 0 0 0 0 ...
Date, format: '2020-03-03' '2020-03-04' '2020-03-05' '2020-03-06' ...
num 5 0 0 0 0 0 0 7 2 5 ...
num 5 5 5 5 5 5 5 12 14 19 ...
fieldEvents(data frame) Data used for evalution of the simulation. Default GABeds220200624
chr 'bed' 'bed' 'bed' 'bed' ...
int 1 2 3 4 5 6 7 8 9 10 ...
int 2 2 3 3 3 3 3 3 4 4 ...
int 2 2 3 3 3 3 3 3 4 4 ...
Date, format: '2020-03-03' '2020-03-04' '2020-03-05' '2020-03-06' ...
resource(vector) Resources used in the simulation.
Default: c('bed', 'intensiveBed', 'intensiveBedVentilation'). For ICU data use:
c('bed', 'intensiveBedVentilation')
chr 'bed' 'bed' 'bed' 'bed' ...
int 1 2 3 4 5 6 7 8 9 10 ...
int 2 2 3 3 3 3 3 3 4 4 ...
int 2 2 3 3 3 3 3 3 4 4 ...
Date, format: '2020-03-03' '2020-03-04' '2020-03-05' '2020-03-06' ...
a list
conf <- babsimToolsConf() simData <- babsim.hospital::dataCovidBeds20200624 fieldData <- babsim.hospital::dataCovidBeds20200624 conf <- getConfFromData( conf = conf, simData = simData, fieldData = fieldData ) # turn on parallel simulation: conf$parallel <- TRUE # Change the start date of the simulations conf$simulationDates$StartDate <- "2020-01-01"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.