Learn R Programming

epiworldR (version 0.11.2.0)

epiworld-transmissions: Transmission network

Description

Transmission edges, including seeded infections (source = -1).

Usage

get_transmissions(x)

Value

  • The function get_transmissions returns a data.frame with the following columns: date, source, target, virus_id, virus, and source_exposure_date.

Arguments

x

An object of class epiworld_sir, epiworld_seir, etc. (any model).

Details

The function get_transmissions includes the seeded infections, with the source column coded as -1.

Examples

Run this code
# SEIR Connected model
seirconn <- ModelSEIRCONN(
  name              = "Disease",
  n                 = 10000,
  prevalence        = 0.1,
  contact_rate      = 2.0,
  transmission_rate = 0.8,
  incubation_days   = 7.0,
  recovery_rate     = 0.3
)

set.seed(937)
run(seirconn, 50)

# Get transmission data
head(get_transmissions(seirconn))

Run the code above in your browser using DataLab