[Stable] Allocate missing parameters to be empty two dimensional arrays. Used internally by simulate_infections.

allocate_empty(data, params, n = 0)

Arguments

data

A list of parameters

params

A character vector of parameters to allocate to empty if missing.

n

Numeric, number of samples to assign an empty array

Value

A list of parameters some allocated to be empty

Examples

data <- list(x = 1, y = 2, z = 30)
EpiNow2:::allocate_empty(data, params = c("x", "t"))
#> $x
#> [1] 1
#> 
#> $y
#> [1] 2
#> 
#> $z
#> [1] 30
#> 
#> $t
#> <0 x 0 matrix>
#>