View source: R/likert_convert.R
likert_convert | R Documentation |
This is used for converting data, for instance, from a 6-point scale to a 5-point scale. The scale "dimensions" are specified in the function argument, and the function converts the numeric vector that is passed through.
likert_convert(x, top.x, bot.x, top.y, bot.y)
x |
Numeric vector to be passed through. |
top.x |
Top value of the original scale. This would be 6 on a 0-6 scale. |
bot.x |
Bottom value of the original scale. This would be 0 on a 0-6 scale. |
top.y |
Top value of the new/target scale. This would be 5 on a 0-5 scale. |
bot.y |
Bottom value of the new/target scale. This would be 0 on a 0-5 scale. |
A numeric vector containing the rescaled likert scale variable.
data <-c(5, 4, 3, 2, 1)
likert_convert(data,5,0,10,0) #5-point scale to 10-point scale
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.