var_any: Is any variable true? (Logical OR)

View source: R/var_any.R

var_anyR Documentation

Is any variable true? (Logical OR)

Description

Create a new variable which is true if any of the variables in a list of variables are true.

Usage

var_any(newvr, vrs)

Arguments

newvr

name of the new variable to be created

vrs

vector of logical variables

Value

Survey object

See Also

Other variables: var_all(), var_case(), var_collapse(), var_copy(), var_cross(), var_cut(), var_not()

Examples

set_survey(namcs2019sv)
var_any("Imaging services"
, c("ANYIMAGE", "BONEDENS", "CATSCAN", "ECHOCARD", "OTHULTRA"
, "MAMMO", "MRI", "XRAY", "OTHIMAGE"))
tab("Imaging services")

surveytable documentation built on Aug. 26, 2025, 1:07 a.m.