我正在使用R包likert根据问卷制作图表。这些图表基本上只是偏好谱,并且看起来非常像这个reprex(没有原始数据,无法公开):
data("pisaitems")
title <- "How often do you read these materials because you want to?"
items29 <- pisaitems[,substr(names(pisaitems), 1,5) == 'ST25Q']
head(items29); ncol(items29)
names(items29) = c("Magazines", "Comic books", "Fiction", "Non-fiction books", "Newspapers")
l29 <- likert(items29)
str(l29)
l29s <- likert(summary = l29$results)
str(l29s)
scale_height = knitr::opts_chunk$get('fig.height')*0.5
scale_width = knitr::opts_chunk$get('fig.width')*1.25
knitr::opts_chunk$set(fig.height = scale_height, fig.width = scale_width)
theme_update(legend.text = element_text(size = rel(0.7)))
plot(l29s) + ggtitle(title)
以下是我的问题:
- 我正在为一家德国公司进行分析,但似乎无法去掉图表中的“百分比”标签?
- 如何将轴上的刻度改为每次增加10%?
- 如何使项目名称左对齐并居中标题?如何将图例与左下角对齐?
提示:示例源自此网站: https://rpubs.com/m_dev/likert_summary