1

This is my data frame that's I'm working for.

Satisf <- likert(as.data.frame(Dataset_clean[ , 16]), grouping = Dataset$Qual é o seu grupo de idade?)

likert.bar.plot(Satisf,legend = "Legenda")

Dataset_clean[16] Em geral, qual o seu nível de satisfação profissional? 1 Satisfeito 2 Satisfeito 3 Satisfeito 4 Insatisfeito 5 Insatisfeito 6 Insatisfeito 7 Insatisfeito 8 Insatisfeito

Dataset[8] Qual é o seu grupo de idade? 1 Geração Z (18-24 anos) 2 Geração Z (18-24 anos) 3 Geração Z (18-24 anos) 4 Geração Z (18-24 anos) 5 Geração Z (18-24 anos) 6 Geração Z (18-24 anos) 7 Geração Z (18-24 anos) 8 Geração Z (18-24 anos)

I'm trying to create a plot with one column, but I'm getting in trouble.

Likert cannot handle with one column if and plot  Dataset_clean[12:16]

I dont know how to edit column name that appear in the graph with a name Dataset_clean[ , 16]

Error in likert(Satisf, grouping = Dataset_clean$`Qual é o seu grupo de idade?`) : 
  The items parameter must be a data frame. If trying to subset a data frame to analyze only one column, try: items=mydf[,1, drop=FALSE].

Should be a bug?: This check should probably just be is.data.frame(). Perhaps it can be reported at https://github.com/jbryer/likert/issues?

It looks like it's fixed in the latest development version though: https://github.com/jbryer/likert/blob/master/R/likert.R#L71-L75

enter image description here

Anyone knows how to edit $data$item enter image description here

Maybe is the problem: Satisf[["data"]][["Item"]] 1 Dataset_clean[, 16] Dataset_clean[, 16] Dataset_clean[, 16] Dataset_clean[, 16] Dataset_clean[, 16] [6] Dataset_clean[, 16] Dataset_clean[, 16] Dataset_clean[, 16] Levels: Dataset_clean[, 16]

  • 1
    What package is `likert()` from? Also, a reproducible example would go a long way to helping. – Phil Jul 08 '21 at 18:33
  • Documentation for package ‘likert’ version 1.3.5 – Julio Cesar Jul 08 '21 at 19:08
  • RStudio Version 1.3.1093 © 2009-2020 RStudio, PBC Operation system windows 10 – Julio Cesar Jul 08 '21 at 19:09
  • RStudio has nothing to do with your issue. And it's not possible to help you without understanding your data. – Phil Jul 08 '21 at 19:14
  • I got the solution: Basically I renamed items and recode results$Item. Satisf$items <- rename(Satisf$items, replace = c("Dataset_clean[, 16]" = "Satisfação")) Satisf$results$Item <- recode_factor(Satisf$results$Item, "Dataset_clean[, 16]" = "Satisfação") – Julio Cesar Jul 10 '21 at 15:54

0 Answers0