reverse reverse codes a numeric vector based on minimum and maximum
values. For example, say numerical values of response options can range from
1 to 4. The function will change 1 to 4, 2 to 3, 3 to 2, and 4 to 1. If there
are an odd number of response options, the middle in the sequence will be
unchanged.
Usage
reverse(x, mini, maxi)
Value
numeric vector that correlates exactly -1 with x.
Arguments
x
numeric vector.
mini
numeric vector of length 1 specifying the minimum numeric value.
maxi
numeric vector of length 1 specifying the maximum numeric value.