This function reverse-codes numeric variables. For example, a 1-7 Likert scale becomes a 7-1 Likert scale (1=7, 2=6, etc.). This is achieved by taking the maximum value of the variable, adding the minimum (acting as an offset), and subtracting each value.
Arguments
- df
data.frame
- vars
(character) vector of variable names
- scale_min
(numeric, optional) minimum value on the scale (default is to use observed minimum value)
- scale_max
(numeric, optional) maximum value on the scale (default is to use observed maximum value)