Skip to content

Commit

Permalink
Adding code to plot global epicurve (as it appeared in episoap vignette)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmenTamayo committed Apr 23, 2024
1 parent cb079b2 commit 3d723bf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion inst/rmarkdown/templates/transmissibility/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,19 @@ n_groups <- dplyr::n_distinct(get_groups(dat_i)[[1]])
small_counts <- max(get_count_value(dat_i)) < 20
```

```{r}
#Plot to visualise an epicurve with total cases of disease over time
dat_i %>%
plot(fill = group_var, angle = 45, colour_palette = muted) +
labs(
title = "Weekly incidence of disease cases", x = "", y = "Incidence")
```

```{r fig.height = 5 / 3 * n_groups}
#Plot to generate epicurves stratified by group_var
dat_i %>%
plot(alpha = 1, nrow = n_groups) +
labs(title = "Incidence of cases over time")
labs(x = "", y = "Incidence")
```

## Numbers of cases
Expand Down

0 comments on commit 3d723bf

Please sign in to comment.