# NOT RUN {
data(efc)
# non-grouped
table(efc$neg_c_7)
# split into 3 groups
table(split_var(efc$neg_c_7, groupcount = 3))
# split multiple variables into 3 groups
split_var(efc, neg_c_7, pos_v_4, e17age, groupcount = 3)
frq(split_var(efc, neg_c_7, pos_v_4, e17age, groupcount = 3))
# original
table(efc$e42dep)
# two groups, non-inclusive cut-point
# vector split leads to unequal group sizes
table(split_var(efc$e42dep, groupcount = 2))
# two groups, inclusive cut-point
# group sizes are equal
table(split_var(efc$e42dep, groupcount = 2, inclusive = TRUE))
# }
Run the code above in your browser using DataLab