File tree Expand file tree Collapse file tree 2 files changed +6
-24
lines changed
Expand file tree Collapse file tree 2 files changed +6
-24
lines changed Original file line number Diff line number Diff line change 33# Practical 4
44# Activity 3
55
6+ # step: fill in your room number
67room_number <- # <COMPLETE> replace with 1/2/3/4
78
89# Combine interventions --------------------------------------------------
@@ -18,6 +19,7 @@ simulate_twointerventions <- epidemics::model_default(
1819 increment = 1.0
1920)
2021
22+ epidemics :: epidemic_peak(simulate_twointerventions )
2123
2224# Visualize effect --------------------------------------------------------
2325# Plot new infections
@@ -36,20 +38,9 @@ infections_twointerventions <- epidemics::new_infections(
3638infections_baseline $ scenario <- " Baseline"
3739infections_twointerventions $ scenario <- " ADD intervention 1 + ADD intervention 2" # <COMPLETE>
3840
39- # Combine the data from both scenarios
40- infections_baseline_twointerventions <- bind_rows(
41- infections_baseline ,
42- infections_twointerventions
43- )
44-
45- infections_baseline_twointerventions %> %
46- ggplot(aes(x = time , y = new_infections , colour = scenario )) +
47- geom_line() +
48- scale_y_continuous(labels = scales :: comma )
49-
50-
5141# Compare interventions --------------------------------------------------
5242
43+ # Combine the data from both scenarios
5344compare_interventions <- bind_rows(
5445 infections_baseline ,
5546 infections_intervention ,
Original file line number Diff line number Diff line change 33# Practical 4
44# Activity 3
55
6+ # step: fill in your room number
67room_number <- 2
78
89# Combine interventions --------------------------------------------------
@@ -21,6 +22,7 @@ simulate_twointerventions <- epidemics::model_default(
2122 increment = 1.0
2223)
2324
25+ epidemics :: epidemic_peak(simulate_twointerventions )
2426
2527# Visualize effect --------------------------------------------------------
2628# Plot new infections
@@ -39,20 +41,9 @@ infections_twointerventions <- epidemics::new_infections(
3941infections_baseline $ scenario <- " Baseline"
4042infections_twointerventions $ scenario <- " Mask mandate + School closure"
4143
42- # Combine the data from both scenarios
43- infections_baseline_twointerventions <- dplyr :: bind_rows(
44- infections_baseline ,
45- infections_twointerventions
46- )
47-
48- infections_baseline_twointerventions %> %
49- ggplot(aes(x = time , y = new_infections , colour = scenario )) +
50- geom_line() +
51- scale_y_continuous(labels = scales :: comma )
52-
53-
5444# Compare interventions --------------------------------------------------
5545
46+ # Combine the data from all scenarios
5647compare_interventions <- dplyr :: bind_rows(
5748 infections_baseline ,
5849 infections_intervention , # varies depending on last one runned
You can’t perform that action at this time.
0 commit comments