Skip to content

Commit

Permalink
add optional dplyr step
Browse files Browse the repository at this point in the history
  • Loading branch information
avallecam committed Apr 2, 2024
1 parent 508dc38 commit fc3ca72
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions episodes/quantify-transmissibility.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Let's use `{tidyr}` and `incidence2::incidence()` for this:

```{r, warning = FALSE, message = FALSE}
library(tidyr)
library(dplyr)
cases <- incidence2::covidregionaldataUK %>%
# preprocess missing values
Expand All @@ -117,10 +118,12 @@ cases <- incidence2::covidregionaldataUK %>%
date_index = "date",
counts = "cases_new",
interval = "day",
# rename column outputs to fit {EpiNow2}
# rename column outputs to fit {EpiNow2} input
date_names_to = "date",
count_values_to = "confirm"
)
) %>%
# optional, but does not affect {EpiNow2} input
select(-count_variable)
```


Expand Down

0 comments on commit fc3ca72

Please sign in to comment.