plot_likert
我可以使用包中的函数绘制以下数据sjPlot
R
。
library(tidyverse)
df1 <-
data.frame(
matrix(
data = sample(x = c("Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"), size = 500, replace = TRUE),
ncol = 5
)
) %>%
mutate_all(., ~ ordered(., levels = c("Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree")))
df1
library(sjPlot)
plot_likert(
items = df1
, cat.neutral = 3
)
我想知道如何获得以下配色方案:
Strongly Disagree = Dark Red
Disagree = Light Red
Neutral = Gray
Agree = Light Green
Strongly Agree = Dark Green