powered by
Create a new variable which is an interaction of two other variables. Also see tab_cross().
tab_cross()
var_cross(newvr, vr, vrby)
Survey object
name of the new variable to be created
first variable
second variable
Other variables: var_all(), var_any(), var_case(), var_collapse(), var_copy(), var_cut(), var_not()
var_all()
var_any()
var_case()
var_collapse()
var_copy()
var_cut()
var_not()
set_survey(namcs2019sv) var_cross("Age x Sex", "AGER", "SEX") tab("Age x Sex")
Run the code above in your browser using DataLab