rv: Reverse code a scale rating

Description Usage Arguments Value

View source: R/analysis.R

Description

Reverse code a scale rating vector with either specified or empirical minimum and maximum values, and while keeping or discarding the scale attributes (labels)

Usage

1
rv(vector, minValue = NA, maxValue = NA, keepAttr = FALSE)

Arguments

vector

a vector to reverse code

minValue

set the minimum value of the scale, if missing, minimum is estimated from the empirical minimum value (what's in the vector)

maxValue

set the maximum value of the scale, if missing, maximum is estimated from the empirical maximum value (what's in the vector)

keepAttr

bollian, whether to keep or discard the scale's attributes (labels)

Value

A reverse coded vector


pinusm/Mmisc documentation built on June 5, 2021, 7:59 a.m.