更改 'likert' 标准文本

Changing 'likert' standard texts

我不知道如何更改使用 likert 包创建的图上的标准文本。

为了简单起见,我将只提供示例数据,因为解决方案可能是相同的。

library(likert)

data(pisaitems) 

items28 <- pisaitems[, substr(names(pisaitems), 1, 5) == "ST24Q"] 

l28 <- likert(items28) 

plot(l28)

输出应该如下图,我要改的是"Response"和"Percentage."

这两个字

希望能帮到你!

欢迎来到 SO!我不知道likert包但是,它的功能plot似乎是基于ggplot2,所以你可以修改ggplot2方式的选项:

plot(l28) +
  labs(
    x = "Another lab",                          # here you manage axis
    y = "My lab"                                # also here ("inverted "because
                                                # it seems plot has coord_flip option)
  ) + guides(fill=guide_legend("My e title"))   # here you manage the title of the legend