I have 7 variables (GAD_1 through GAD_7) in a data frame named emu_dirty. I need to recode the values (from 1-4 to 0-3) for all seven, but I'd rather do this in a more efficient way than listing each variable statically. Is there a way to mutate this, or loop through each of these variables?
# GAD-7 Items
recode_gad_items <- list("GAD_1", "GAD_2", "GAD_3", "GAD_4", "GAD_5", "GAD_6",
"GAD_7")
emu_dirty$GAD_1 = case_match(emu_dirty$GAD_1,
4 ~ 3,
3 ~ 2,
2 ~ 1,
1 ~ 0)