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

  • @eyadha1
    @eyadha1 Жыл бұрын

    thank you very much. it is of great help for me

  • @butterbee_bb
    @butterbee_bb2 жыл бұрын

    Why didn’t you just do as.factor(x[,-1]) %>% as.numeric() %>% rowSums()?

  • @ayushdeshpande5941
    @ayushdeshpande594110 ай бұрын

    Good video, just remove the music