View source: R/addNewIndicator.R
| addNewIndicator | R Documentation |
Create new row to add in indicatorList.
addNewIndicator(
new_id,
dictionary,
IR = FALSE,
PR = FALSE,
KR = FALSE,
BR = FALSE,
HR = FALSE,
MR = FALSE,
AR = FALSE,
CR = FALSE
)
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. |
The a row to rbind into indicator_df
Qianyu Dong
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.