@@ -50,12 +50,12 @@ the advantages of using this.
5050
5151``` {r, eval=TRUE, message=FALSE, warning=FALSE}
5252# Check if a package is already installed and install it if not
53- if (!require ("pak")) install.packages("pak")
54- if (!require ("here")) pak::pak("here")
55- if (!require ("rio")) pak::pak("rio")
56- if (!require ("dplyr")) pak::pak("dplyr")
57- if (!require ("magrittr")) pak::pak("magrittr")
58- if (!require ("cleanepi")) pak::pak("cleanepi")
53+ if (!requireNamespace ("pak", quietly = TRUE )) install.packages("pak")
54+ if (!requireNamespace ("here", quietly = TRUE )) pak::pak("here")
55+ if (!requireNamespace ("rio", quietly = TRUE )) pak::pak("rio")
56+ if (!requireNamespace ("dplyr", quietly = TRUE )) pak::pak("dplyr")
57+ if (!requireNamespace ("magrittr", quietly = TRUE )) pak::pak("magrittr")
58+ if (!requireNamespace ("cleanepi", quietly = TRUE )) pak::pak("cleanepi")
5959
6060# load the packages
6161library(here)
@@ -296,7 +296,8 @@ particular way. These IDs can contain numbers falling within a specific range, a
296296
297297
298298``` {r}
299- # check if the subject IDs in the 'case_id' column contains numbers ranging from 0 to 15000
299+ # check if the subject IDs in the 'case_id' column contains numbers ranging
300+ # from 0 to 15000
300301sim_ebola_data <- cleanepi::check_subject_ids(
301302 data = sim_ebola_data,
302303 target_columns = "case_id",
0 commit comments