prop_or_na: Proportion or NA

View source: R/ReformatLoops.R

prop_or_naR Documentation

Proportion or NA

Description

For a particular gender control item, e.g. "female_adult male_adult" this function works out whether to return NA or a proportion. In this case the proportion controlled by each person would be 0.5

Usage

prop_or_na(item)

Arguments

item

A list of the people controlling a particular resource

Details

Rpackage file: ReformatLoops.R

Examples

item <- c("male_adult", "female_adult")
prop_or_na(item) # should return 0.5

l-gorman/rhomis-R-package documentation built on Nov. 8, 2023, 6:46 a.m.