datapackr_params: Standardized package function parameter definitions

View source: R/packageSetup.R

datapackr_paramsR Documentation

Standardized package function parameter definitions

Description

Standardized package function parameter definitions

Usage

datapackr_params(
  model_data,
  model_data_path,
  snuxim_model_data,
  snuxim_model_data_path,
  undistributed_mer_data,
  SNUxIM,
  MER,
  PSNUxIM_combos,
  datapack_name,
  country_uids,
  template_path,
  submission_path,
  cached_mechs_path,
  cop_year,
  output_folder,
  results_archive,
  d2_session,
  d,
  datastreams,
  schema,
  skip,
  wb,
  PSNUs,
  psnus,
  tool,
  season,
  draft_memo,
  memo_type,
  memo_doc,
  memo_structure,
  memoStructure,
  source_type,
  prios,
  include_no_prio,
  remove_empty_columns,
  spectrum_data,
  sheet,
  sheets,
  ...
)

Arguments

model_data

Data from DATIM needed to pack into a COP Data Pack.

model_data_path

Local filepath to a Data Pack model data file.

snuxim_model_data

Export from DATIM needed to allocate data across mechanisms in the PSNUxIM tab.

snuxim_model_data_path

Local filepath to an SNUxIM Model Data file.

undistributed_mer_data

Data from the d$datim$UndistributedMER dataset that can be provided while generating an OPU tool such that the targets to be distributed will be sourced from this file.

SNUxIM

SNUxIM dataset extract from unPackSNUxIM

MER

MER dataset extract from unPackSheets

PSNUxIM_combos

Dataset extract from unPackSNUxIM that shows data missing from the PSNUxIM tab.

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.

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.

submission_path

Local path to the file to import.

cached_mechs_path

Local file path to an RDS file containing a cached copy of the mechanisms SQL view.

cop_year

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

output_folder

Local folder where you would like your Data Pack to be saved upon export.

results_archive

If TRUE, will export compiled results of all tests and processes to output_folder.

d2_session

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

d

Datapackr sidecar object

datastreams

Data stream or streams. One or more of mer_targets, mer_results, subnat_targets, subnat_results, or impatt. If not specified, then all data streams are returned.

schema

Which datapackr schema to use in guiding this function. If left NULL will select the default based on cop_year and tool.

skip

Character vector of Sheet Names to label for skipping in schema.

wb

Openxlsx workbook object.

PSNUs

Dataframe of PSNUs to use in this function, containing at least psnu_uid.

psnus

Dataframe of PSNUs to use in this function, containing at least psnu_uid.

tool

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

season

Either COP or OPU.

draft_memo

Boolean indicating whether the memo being written is a draft or final memo.

memo_type

memo_type One of the following: datapack: Create the memo based on the data in the datapack or OPU datapack datim: Create the memo based on data currently in DATIM comparison: Create a comparison memo with data from both DATIM and datapack

memo_doc

Officer document object containing the target memo tables.

memo_structure

Structure of the memo d$memo$structure

memoStructure

Structure of the memo d$memo$structure

source_type

Indicates whether the data for a COP Approval Memo table should come from the Data Pack or from DATIM. Values can be either datapack or datim.

prios

Data frame of prioritization levels.

include_no_prio

If TRUE, include "No Prioritiation" as a column in the output.

remove_empty_columns

Should empty columns be removed from memos?

spectrum_data

Spectrum output, as a dataframe.

sheet

String. Name of sheet/tab within tool.

sheets

Character vector. Names of sheets/tabs within tool.

...

Additional arguments to pass.

Value

list of all paramaters of this constructor function

See Also

Other parameter-helpers: parameter-checks


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