reverse.levels: Reverse the levels of a factor.

Description Usage Arguments Examples

Description

Reverse the levels of a factor.

Usage

1

Arguments

x

a factor or a data.frame of factors whose levels will be reverse coded.

Examples

1
2
3
mylevels <- c('Strongly Disagree', 'Disagree', 'Neither', 'Agree', 'Strongly Agree')
test <- factor(sample(mylevels[1:5], 10, replace=TRUE))
cbind(test, as.integer(test), as.integer(reverse.levels(test)))

bryanmayer/likert_custom documentation built on May 13, 2019, 8:10 a.m.