mapXToPara {babsim.hospital}R Documentation

mapXToPara

Description

mapXToPara accepts a n-dim vector. Its values will be mapped onto a babsimHospitalPara list.

Usage

mapXToPara(x)

Arguments

x

(num) n-dim vector. Values will be mapped onto babsimHospitalPara. Names of these parameters can be obtained via getParameterName.

Details

This function will replaced hte function simulateHospital in versions >= 1.2.8.

Value

This function returns an env data frame (tibble [560 × 15] (S3: grouped_df/tbl_df/tbl/data.frame)) with the following entries:

resource (chr)

name of the seized resource: 'bed' 'bed' 'bed' 'bed' ...

time (num)

time step: 3 10 12 13 14 15 15 15 15 16 ...

server (int)

server: 1 2 3 2 3 4 3 4 5 6 ...

limit (num)

limit: Inf Inf Inf Inf Inf ...

replication (int)

replication: 1 1 1 1 1 1 1 1 1 1 ...

upper (int)

upper: 1 2 3 2 3 5 5 5 5 7 ...

lower (int)

lower: 1 2 3 2 3 3 3 3 3 5 ...

med (num)

med: 1 2 3 2 3 4 4 4 4 6 ...

date (POSIXct)

time, format: yyyy-mm-dd hh:mm.ss

rwdate (POSIXct)

format: '2020-03-01' '2020-03-08' '2020-03-15' '2020-03-15' ...

source (chr)

name of the simulation that was used: 'babsim' 'babsim' 'babsim' 'babsim' ...

Examples

x <- rep(0.2, 29)
para <- mapXToPara(x)
conf <- babsimToolsConf()
data <- getObkData()
res <- modelResultHospital(para = para, conf = conf, data = data)
getError(res = res, conf = conf)
p <- plotDailyMaxResults(res)

[Package babsim.hospital version 11.8.8 Index]