calculate_muac: Calculate median MUAC-at_admissions

calculate_muac_medianR Documentation

Calculate median MUAC-at_admissions

Description

Calculate median MUAC-at_admissions

Usage

calculate_muac_median(muac, index = NULL, na_values = NULL)

Arguments

muac

A numeric vector of mid-upper arm circumference measurements either in centimetres or millimetres.

index

A list of one or more factors each of the same length as muac which defines the grouping to be used on muac. Default is NULL (no grouping applied).

na_values

A vector of values in muac that are to be considered as NA values. Default to NULL which will use NA.

Value

A numeric value (if index = NULL) or named vector of values for median mid-upper arm circumference with names from each level of index.

Examples

calculate_muac_median(otp_beneficiaries$muac)
calculate_muac_median(otp_beneficiaries$muac, otp_beneficiaries$locality)


rapidsurveys/squeacr documentation built on Dec. 23, 2024, 11:56 p.m.