Skip to contents

This function automatically scores a set of items and creates a scale variable. It detects inverse coding using the psych::alpha function.

Usage

auto_score(df, prefix)

Arguments

df

a dataframe that contains an item set

prefix

the prefix used in all items and also the name of the new scale.

Value

the dataframe with the new scale column

Examples

if (FALSE) {
library(dataforsocialscience)
robo_care_raw %>% auto_score("KUT")
}