likert_reverse: Reverse a Likert scale

View source: R/likert_reverse.R

likert_reverseR Documentation

Reverse a Likert scale

Description

Reverse a Likert scale such that on a 0-10 scale, 10 becomes 0 and 0 becomes 10. Use the top and bottom arguments to specify the valid range of the scale.

Usage

likert_reverse(x, top, bottom)

Arguments

x

Numeric vector

top

Top value of the scale for the variable, e.g. 10 for a 0-10 scale.

bottom

value of the scale for the variable, e.g. 0 for a 0-10 scale.

Value

A numeric vector which is the "reverse" of the original likert scale variable.

Examples

data <-c(5, 4, 3, 2, 6)
likert_reverse(data, 6, 0)

martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.