Create attribute about whether any variable contains a specific value
Source:R/attributes.R
any_vars.Rd
Inspect all columns whose names match var_pattern
and determine whether any contain the value var_val
.
Arguments
- df
Data frame. Household-level microdata that contains the attribute to extract.
- var_pattern
Character Regular expression used to select variables to be counted.
- var_val
Numeric. Value(s) to count in columns identified by
var_pattern
.- attrib_name
Character. Name to give the attribute in the issues data file
- attrib_vars
Character. Regular expression that identifies the variable in
var
.