View source: R/likert_reverse.R
likert_reverse | R Documentation |
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.
likert_reverse(x, top, bottom)
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. |
A numeric vector which is the "reverse" of the original likert scale variable.
data <-c(5, 4, 3, 2, 6)
likert_reverse(data, 6, 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.