Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
403 views
in Technique[技术] by (71.8m points)

r - How to print the plot title while including a histogram in the likert package?

I'm plotting data using the likert package, but cannot get the plot title to display when including a histogram.

library(likert)
library(grid)

data(pisaitems) # loading sample data
items24 <- pisaitems[,substr(names(pisaitems), 1,5) == 'ST24Q'] # using a subset of the data
l24 <- likert(items24) 

plot(l24) + ggtitle("Title") # this works fine
plot(l24, include.histogram=TRUE) # this works fine too
plot(l24, include.histogram=TRUE)+ ggtitle("Title") # returns the error "non-numeric argument to binary operator"

question from:https://stackoverflow.com/questions/65943847/how-to-print-the-plot-title-while-including-a-histogram-in-the-likert-package

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...