format_mortality_to_ena: Reformat Mortaltiy to ENA

View source: R/format_mortality_to_ena.R

format_mortality_to_enaR Documentation

Reformat Mortaltiy to ENA

Description

This function will take a standardized mortality dataset and reshape it for use in the ENA software.

Usage

format_mortality_to_ena(
  df,
  file_path = NULL,
  keep_cluster_ids = NULL,
  keep_hh_ids = NULL
)

Arguments

df

Inputs a dataframe which has been standardized already by the format_mortality_current_census function.

file_path

Inputs an optional character value for specifying a file path to save the output as an xlsx file.

keep_cluster_ids

A TRUE or FALSE value whether the user wants to include cluster ids as they are in the dataset, or have the function automatically recode them to ambiguous numerical values for ENA.

keep_hh_ids

A TRUE or FALSE value whether the user wants to include households ids as they are in the dataset, or have the function automatically recode them to ambiguous numerical values for ENA.

Value

Returns a dataframe with wide mortality data, that is each row is a single household, which is formatted for ENA. The resulting dataframe can be copy-pasted straight into the ENA program for analysis of mortality data.

Examples

## Not run: format_mortality_to_ena(df = proc_mortality1)


SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.