make_mdb_tx_df: Creates the base table for the treatment / VLS MDB tables

View source: R/make_mdb_tx_df.R

make_mdb_tx_dfR Documentation

Creates the base table for the treatment / VLS MDB tables

Description

Uses the collapse_vlc_tbl() to combine different data frames needed to calculate VLS and VLC. Filters for mechs with known issues by default, can be controlled with resolve_issues argument. Wrapper function to create three core tables needed for the treatment MDB data frame.

First, it creates a TX_CURR table and excludes South Africa from the USAID Global table. Second, collapse_vlc_tbl() is called to create the VLS/VLC table needed for derived indicators. Third, Three month + MMD is calculated from the TX_CURR table. Finally, the tables are combined to be used in creation of the VLS/VLC and MMD+ Share calculations.

Usage

make_mdb_tx_df(df, resolve_issues = "TRUE", tx_indic = "TX_CURR")

Arguments

df

usually and ou_im data frame

resolve_issues

logical indicating whether or not known issues are removed

tx_indic

TX_CURR is only valid value

Value

data frame of the combined TX and VLS/VLC indicator

See Also

reshape_mdb_tx_df() used to reshape the resulting output into gt ready data frame;

Other data frame munging: collapse_base_tbl(), collapse_vlc_tbl(), make_mdb_df(), reshape_mdb_df(), reshape_mdb_tx_df()


USAID-OHA-SI/selfdestructin5 documentation built on Feb. 23, 2025, 5:08 a.m.