Learn R Programming

surveytable (version 0.9.6)

var_all: Are all the variables true? (Logical AND)

Description

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

Usage

var_all(newvr, vrs)

Value

Survey object

Arguments

newvr

name of the new variable to be created

vrs

vector of logical variables

See Also

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

Examples

Run this code
set_survey(namcs2019sv)
var_all("Medicare and Medicaid", c("PAYMCARE", "PAYMCAID"))
tab("Medicare and Medicaid")

Run the code above in your browser using DataLab