packDataPackSheets: Loop through and populate normal Data Pack sheets

View source: R/packSheets.R

packDataPackSheetsR Documentation

Loop through and populate normal Data Pack sheets

Description

Loops through all normally structured sheets in a submitted Data Pack and writes data.

Usage

packDataPackSheets(
  wb,
  country_uids,
  ou_level = "Prioritization",
  org_units = NULL,
  model_data = NULL,
  schema = pick_schema(),
  sheets = NULL,
  cop_year = getCurrentCOPYear()
)

Arguments

wb

datapackr list object.

country_uids

Character vector of Country UIDs from DATIM.

ou_level

Level in DATIM hierarchy to pull orgUnits from. Choose from: "Prioritization", "Community", "Facility", or the numbers 4 through 7.

org_units

Allows for specification of custom list of orgUnits to include in Data Pack sheets.

model_data

Dataset to use as input for packing Data Pack. If left NULL, will produce a Data Pack with orgUnits and disagg specifications, but no data.

schema

Defaults to standard Data Pack schema, but allows for provision of custom schema if needed.

sheets

Sheets to pack. Defaults to all those available in wb, minus the first few front-matter/summary tabs.

cop_year

COP year for dating as well as selection of templates.

Value

wb with all sheets written except SNU x IM


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