Skip to content

Commit 578de0b

Browse files
committed
add optional dplyr step
1 parent 5f9cf8c commit 578de0b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

episodes/quantify-transmissibility.Rmd

+5-2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Let's use `{tidyr}` and `incidence2::incidence()` for this:
108108

109109
```{r, warning = FALSE, message = FALSE}
110110
library(tidyr)
111+
library(dplyr)
111112
112113
cases <- incidence2::covidregionaldataUK %>%
113114
# preprocess missing values
@@ -117,10 +118,12 @@ cases <- incidence2::covidregionaldataUK %>%
117118
date_index = "date",
118119
counts = "cases_new",
119120
interval = "day",
120-
# rename column outputs to fit {EpiNow2}
121+
# rename column outputs to fit {EpiNow2} input
121122
date_names_to = "date",
122123
count_values_to = "confirm"
123-
)
124+
) %>%
125+
# optional, but does not affect {EpiNow2} input
126+
select(-count_variable)
124127
```
125128

126129

0 commit comments

Comments
 (0)