
Set up the folders and load polio data for the desk review
init_dr.RdPrepares the folders and files required for the desk review. The function primarily
serves to organize the files used for the desk review and set standardized
environmental variables (i.e., Sys.getenv(), where values for x related to
the desk review is prefixed with "DR") . The function only supports running one country at a time.
Usage
init_dr(
country_name,
start_date = NULL,
end_date = NULL,
local_dr_folder = getwd(),
lab_data_path = NULL,
iss_data_path = NULL,
attach_spatial_data = T,
branch = "main",
source = F,
data_folder = "GID/PEB/SIR/Data",
polis_folder = "GID/PEB/SIR/POLIS",
use_edav = TRUE
)Arguments
- country_name
strName of the country. You may pass multiple countries as a vector of strings.- start_date
strStart date of the desk review. IfNULL, defaults to four years from when the function was ran on January 1st.- end_date
strEnd date of the desk review. IfNULL, defaults to six weeks from when the function is ran.- local_dr_folder
strFolder where the desk review code is located. Defaults to the current working directory.- lab_data_path
strLocation of the lab data. Defaults toNULL.- iss_data_path
strLocation of the ISS data. Defaults toNULL.- attach_spatial_data
logicalWhether to include spatial data. Defaults toTRUE.- branch
strWhat branch to download the DR functions from GitHub."main"is the default, which contains the official version of the package. Other branches, like"dev"may contain experimental features not yet available in the"main"branch.- source
logicalWhether to source local functions or use sirfunctions. Defaults toFALSE.- data_folder
strLocation of the data folder containing pre-processed POLIS data, spatial files, coverage data, and population data. Defaults to"GID/PEB/SIR/Data".- polis_folder
strLocation of the POLIS folder. Defaults to"GID/PEB/SIR/POLIS".- use_edav
logicalBuild raw data list using EDAV files. Defaults toTRUE.
Examples
if (FALSE) { # \dontrun{
ctry.data <- init_dr("algeria", source = F) # Sets up folder in the current working directory
ctry.data <- init_dr("algeria", branch = "dev") # Use functions from the dev branch
ctry.data <- init_dr(c("algeria", "nigeria"), source = F) # Multiple countries.
} # }