loadDataPack: Load a DataPack from a supplied filepath.

View source: R/loadDataPack.R

loadDataPackR Documentation

Load a DataPack from a supplied filepath.

Description

loadDataPack returns a DataPack object conserving styles and formatting of the original Data Pack .xlsx file, as well as other metadata necessary for processing and analyzing data in the Data Pack.

Usage

loadDataPack(
  submission_path = NULL,
  tool = NULL,
  country_uids = NULL,
  season = NULL,
  cop_year = NULL,
  load_wb = FALSE,
  load_sheets = FALSE,
  pzns = NULL,
  d2_session = dynGet("d2_default_session", inherits = TRUE)
)

Arguments

submission_path

Local path to the file to import.

tool

Type of tool this function will create or interact with. Either OPU Data Pack or Data Pack

country_uids

Unique IDs for countries to include in the Data Pack. For full list of these IDs, see datapackr::valid_OrgUnits.

season

Either COP or OPU.

cop_year

COP Year to use for tailoring functions. Remember, FY22 targets = COP21.

load_wb

Should the datapack be loaded as an openxlsx object?

load_sheets

Logical. Should all data sheets be loaded too?

d2_session

DHIS2 Session id. R6 datimutils object which handles authentication with DATIM.

Value

DataPack object.

Author(s)

Scott Jackson


pepfar-datim/datapackr documentation built on April 14, 2024, 10:35 p.m.