-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.R
30 lines (24 loc) · 818 Bytes
/
main.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# install packages if needed
if (!requireNamespace("librarian")) install.packages("librarian", quiet = TRUE)
suppressWarnings(
librarian::stock(
DataS-DHSC/DHSClogger,
tidyverse, yaml,
tools, fs,
curl, httr, polite, rvest,
tidyxl, unpivotr, writexl, lubridate,
ggrepel, scales, sf, svglite,
rmarkdown, here,
quiet = TRUE
)
)
# Setup logging -----------------------------------------------------------
logger <- DHSClogger::get_dhsc_logger()
# set threshold of console log to information and above
logger$set_threshold("log.console", "INFO")
# Call main code ----------------------------------------------------------
logger$info("[Begin]")
# add source of run script and entry point to code below
source("./R/run_analysis.R", local = TRUE)
run_analysis()
logger$info("[End]")