addNewIndicator: Create new row to add in indicatorList.

View source: R/addNewIndicator.R

addNewIndicatorR Documentation

Create new row to add in indicatorList.

Description

Create new row to add in indicatorList.

Usage

addNewIndicator(
  new_id,
  dictionary,
  IR = FALSE,
  PR = FALSE,
  KR = FALSE,
  BR = FALSE,
  HR = FALSE,
  MR = FALSE,
  AR = FALSE,
  CR = FALSE
)

Arguments

new_id

The ID of the new indicator (e.g., "FE_FRTR_W_A10").

dictionary

The DHS indicator dictionary data frame, e.g.sae4health::DHS_ind_dictionary

IR

Logical flag indicating whether the IR recode file is required.

PR

Logical flag indicating whether the PR recode file is required.

KR

Logical flag indicating whether the KR recode file is required.

BR

Logical flag indicating whether the BR recode file is required.

HR

Logical flag indicating whether the HR recode file is required.

MR

Logical flag indicating whether the MR recode file is required.

AR

Logical flag indicating whether the AR recode file is required.

CR

Logical flag indicating whether the CR recode file is required.

Value

The a row to rbind into indicator_df

Author(s)

Qianyu Dong

Examples

## Not run: 
newrow=addNewIndicator(new_id="RH_DELP_C_HOM", dictionary= sae4health::DHS_ind_dictionary,
IR=FALSE, PR=FALSE, KR=FALSE, BR=TRUE,
HR=FALSE, MR=FALSE, AR=FALSE, CR=FALSE )
newrow <- newrow[, names(indicatorList)]
indicatorList <- rbind(indicatorList, newrow)

## End(Not run)



surveyPrev documentation built on June 19, 2026, 5:06 p.m.