auto_score: This function automatically scores a set of items and creates...

Description Usage Arguments Value Examples

View source: R/auto_score.R

Description

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

Usage

1
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

1
2
3
4
5
## Not run: 
library(dataforsocialscience)
robo_care_raw %>% auto_score("KUT")

## End(Not run)

HCIC/r-tools documentation built on Dec. 26, 2020, 3:54 p.m.