I haven't used the likert package for a while and I've rerun my likert plot and come up with this error:
Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, : invalid value 0 for 'digits' argument
I've since tried a couple of examples I've found online and get the same error. Anyone else had this problem?
Here's the easiest example to reproduce the results.
Input =("
Pooh Piglet Tigger
3 2 4
5 4 4
4 2 4
4 2 4
4 1 5
4 2 3
4 3 5
4 2 4
5 2 4
5 3 3
")
Data = read.table(textConnection(Input),header=TRUE)
Data$Pooh = factor(Data$Pooh,
levels = c("1", "2", "3", "4", "5"),
ordered = TRUE)
Data$Piglet = factor(Data$Piglet,
levels = c("1", "2", "3", "4", "5"),
ordered = TRUE)
Data$Tigger = factor(Data$Tigger,
levels = c("1", "2", "3", "4", "5"),
ordered = TRUE)
library(likert)
likert(Data)
Result = likert(Data)
plot(Result,
type="bar")
Thanks