Inverting scales
inv(x, min, max)
A vector of numeric data.
The minimum value of the scale.
The maximum value of the scale.
# NOT RUN { # Assuming you have a Likert-scale from 1 to 9 x <- c(4, 5, 2, 3, 7, 8, 3) inv(x, 1, 9) # }
Run the code above in your browser using DataCamp Workspace