Hi there,
I would like to flip or invert the colour scale used as default in the likert analysis. I have tried reverse.levels
but I get the following error message "Error in reverse.levels(p) : Unsupported format: likert"
Here is some sample data and code.
question1<- c(1,5,3,4,1,1,1,3,4,5)
question2<- rev(c(1,5,3,4,1,1,1,3,4,5))
question3<- c(1,1,1,2,2,2,3,3,4,5)
question4<- c(5,5,5,4,4,4,3,3,2,1)
testData<-data.frame(question1,question2,question3,question4)
testData <- lapply(testData, factor, levels= c(1:5), ordered = TRUE)
testData <- as.data.frame(testData)
df.reverse <- reverse.levels(testData)
#> Error in reverse.levels(testData): could not find function "reverse.levels"
p <- (likert(testData))
#> Error in likert(testData): could not find function "likert"
plot(p)
#> Error in plot(p): object 'p' not found
df.reverse <- reverse.levels(p)
#> Error in reverse.levels(p): could not find function "reverse.levels"
Created on 2022-11-21 with reprex v2.0.2
Produces the following:
I would like the dark green to be for response 1, not 5 etc
Any help or advice is greatly appreciated.