prepareMemoDataByPSNU: Prepare Memo Data By PSNU

View source: R/prepareMemoData.R

prepareMemoDataByPSNUR Documentation

Prepare Memo Data By PSNU

Description

This function calculates COP memo indicators at the PSNU level. If the parallel library is installed, very significant processing times can be achieved through parallel processing.

Usage

prepareMemoDataByPSNU(
  analytics,
  memo_type,
  inds,
  prios,
  partners_agencies,
  psnus,
  cop_year,
  n_cores = getMaxCores()
)

Arguments

analytics

Data frame consisting of at least psnu_uid, categoryoptioncombo_id, mechanism_code and target value

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

inds

Data frame of indicators from getMemoIndicators

prios

Data frame of prioritization levels.

partners_agencies

Result of getMechanismView

psnus

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

cop_year

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

n_cores

Indicates how many cores should be used.

Value

A dataframe of COP indicators aggregated to the PSNU level.


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