Description Usage Arguments Examples
Reverse the levels of a factor.
1 |
x |
a factor or a data.frame of factors whose levels will be reverse coded. |
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)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.