Creating sum scales in R - Using mutate and across in dplyr
learning objectives
what rowSums does
what arguments rowSums requires
how to use rowSums within mutate
why we need multiple mutate statements
practice:
with the same dataset:
recode a-e to be 10-15
reverse code mssi2-mssi6 and dep1:dep3
create sum scales for sf_a/b/c using different rules (you choose)
practice dataset: quantpsych.net/data/data_satisfaction.csv
R code: quantpsych.net/data/10b-advanced dplyr. R
Пікірлер: 3
thank you very much. it is of great help for me
Why didn’t you just do as.factor(x[,-1]) %>% as.numeric() %>% rowSums()?
Good video, just remove the music