.add_cols | R Documentation |
<data.frame>
These .add_*()
functions add columns to the <data.frame>
output by .sim_network_bp()
. The <data.frame>
supplied to .data
will
have a different number of columns depending on which function is being
called (i.e. the <data.frame>
supplied to .add_hospitalisation()
will
have more columns than the <data.frame>
supplied to .add_date_contact()
as former function is called later in the simulation).
The event date could be first contact, last contact or other.
.add_date_contact(
.data,
first_contact_distribution,
last_contact_distribution,
outbreak_start_date
)
.add_hospitalisation(.data, onset_to_hosp, hosp_risk)
.add_outcome(
.data,
onset_to_death,
onset_to_recovery,
hosp_death_risk,
non_hosp_death_risk,
config
)
.add_names(.data, anonymise = FALSE)
.add_ct(.data, distribution)
.add_reporting_delay(.data, reporting_delay)
.data |
A |
first_contact_distribution , last_contact_distribution |
A |
outbreak_start_date |
A |
onset_to_hosp |
A The function can be defined or anonymous. The function must return a vector
of An The default is an anonymous function with a lognormal distribution random
number generator ( If |
hosp_risk |
Either a single |
onset_to_death |
A The function can be defined or anonymous. The function must return a vector
of An The default is an anonymous function with a lognormal distribution random
number generator ( If For hospitalised cases, the function ensures the onset-to-death time is
greater than the onset-to-hospitalisation time. After many (1000) attempts,
if an onset-to-death time (from |
onset_to_recovery |
A The function can be defined or anonymous. The function must return a vector
of An The default is For hospitalised cases, the function ensures the onset-to-recovery time is
greater than the onset-to-hospitalisation time. After many (1000) attempts,
if an onset-to-recovery time (from |
hosp_death_risk |
Either a single |
non_hosp_death_risk |
Either a single |
config |
A list of settings to adjust the randomly sampled delays and
Ct values. See |
anonymise |
A |
reporting_delay |
A The function can be defined or anonymous. The function must return a vector
of The default is |
A <data.frame>
with one more column than input into .data
.
Unless the column heading is already present in which the data is
overwritten.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.