So I performed a sentiment analysis using tidy principles. I would like to plot the results in a comparison cloud (positive VS negative sentiments).
This is my code:
library(reshape2)
library(tidytext)
dtm_tidy %>%
filter()
dtm_tidy %>%
inner_join(get_sentiments("bing"),by=c(term="word")) %>%
count(term, sentiment, sort=TRUE) %>%
acast(term ~ sentiment, value.var = "n", fill = 0) %>%
comparison.cloud(colors = c("darkred", "darkgreen"), max.words=300, scale = c(0.3, 0.3), random.order=FALSE, rot.per=0.25, title.size = 1)
However, something seems to go wrong, because the titles (positive & negative) are not shown or rendered. I already changed scales and title.size but nothing could solve this issue.
Anybody an idea?