diff --git a/episodes/severity-static.Rmd b/episodes/severity-static.Rmd index 0ce2edad..6fad7fc9 100644 --- a/episodes/severity-static.Rmd +++ b/episodes/severity-static.Rmd @@ -42,12 +42,9 @@ This episode requires you to be familiar with: Install packages if their are not already installed -```{r, eval = FALSE} -# if {pak} is not installed, run: install.packages("pak") -pak::pak("cfr") -pak::pak("epiparameter") -pak::pak("tidyverse") -pak::pak("outbreaks") +```r +if (!base::require("pak")) install.packages("pak") +pak::pak(c("cfr", "epiparameter", "tidyverse", "outbreaks")) ``` If you have any error message, diff --git a/episodes/superspreading-estimate.Rmd b/episodes/superspreading-estimate.Rmd index 9c8f1e35..a89a6b74 100644 --- a/episodes/superspreading-estimate.Rmd +++ b/episodes/superspreading-estimate.Rmd @@ -41,13 +41,9 @@ Learners should familiarise themselves with following concept dependencies befor Install packages if their are not already installed -```{r, eval = FALSE} -# if {pak} is not installed, run: install.packages("pak") -pak::pak("epicontacts") -pak::pak("fitdistrplus") -pak::pak("superspreading") -pak::pak("outbreaks") -pak::pak("tidyverse") +```r +if (!base::require("pak")) install.packages("pak") +pak::pak(c("epicontacts", "fitdistrplus", "superspreading", "outbreaks", "tidyverse")) ``` If you have any error message,