check_val_in_list: Check Value is in List

View source: R/ReformatLoops.R

check_val_in_listR Documentation

Check Value is in List

Description

In the case of the gender calculations, this function can check whether a particular gender category is found in a string.

Usage

check_val_in_list(item, category)

Arguments

item

A list of gender control strings (see example)

category

The category you are trying to identify

Details

Rpackage file: ReformatLoops.R

Examples


item <- c("male_adult female_adult", "male_adult", NA, "female_youth")
category <- "female_youth"
check_val_in_list(item, category)

item <- c("male_adult female_adult", "male_adult", NA, "female_youth")
category <- "male_adult"
check_val_in_list(item, category)

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