| var_cross {surveytable} | R Documentation |
Cross or interact two variables
Description
Create a new variable which is an interaction of two other variables. Also
see tab_cross().
Usage
var_cross(newvr, vr, vrby)
Arguments
newvr |
name of the new variable to be created |
vr |
first variable |
vrby |
second variable |
Value
Survey object
See Also
Other variables:
var_all(),
var_any(),
var_case(),
var_collapse(),
var_copy(),
var_cut(),
var_not()
Examples
set_survey(namcs2019sv)
var_cross("Age x Sex", "AGER", "SEX")
tab("Age x Sex")
[Package surveytable version 0.9.4 Index]