createDataPack: Create a new Data Pack

View source: R/createDataPack.R

createDataPackR Documentation

Create a new Data Pack

Description

Creates a brand new Data Pack with the supplied characteristics.

Usage

createDataPack(
  datapack_name = NULL,
  country_uids,
  season,
  template_path = NULL,
  cop_year = NULL,
  tool = NULL,
  d2_session = dynGet("d2_default_session", inherits = TRUE)
)

Arguments

datapack_name

Name you would like associated with this Data Pack. (Example: "Western Hemisphere", or "Caribbean Region", or "Kenya".)

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.

template_path

Local filepath to Data Pack template Excel (XLSX) file. This file MUST NOT have any data validation formats present. If left NULL, will select the default based on cop_year and tool.

cop_year

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

tool

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

d2_session

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

Value

Data Pack object

Author(s)

Scott Jackson


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