replay_outbreak: Replays an outbreak up until a specific point in time

Description Usage Arguments Value Examples

Description

Replays an outbreak up until a specific point in time

Usage

1
replay_outbreak(full_outbreak)

Arguments

full_outbreak

the full outbreak datasets

Value

a list with named components having functions (replay/isolate_at) operating on the outbreak

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1235)
SI <- distcrete("gamma", 1L, w = 0, 10, 0.65)
d_contacts <- distcrete("exp", 1L, w=0, 0.05)
x <- contact_outbreak(3, 1.8, SI$r, d_contacts$r, max_cases = 10)
replay <- replay_outbreak(x)
plot(replay$replay(99))
outbreak_2 <- replay$isolate_at(2, 24)
plot(outbreak_2$replay(99))
outbreak_3 <- outbreak_2$isolate_at(3, 25)
plot(outbreak_3$replay(99))

reconhub/contactsim documentation built on May 27, 2019, 4:02 a.m.