Wordcloud and plotting sentiment score error

Hi! Welcome!

For the second problem, I think it’s just a typo. The code names the variables in SentimentScores as Sentiment and Scores, but in the ggplot call, the x variable is given as sentiment (all lowercase). R is case sensitive, so x needs to be specified as Sentiment, instead.

For the first problem, this will be a lot easier to solve if helpers can run the code and experiment with it. Can you turn this into a self-contained, reproducible example? You’re pretty close — the additional components you’d need to supply are:

  • sample data
  • the relevant library() calls

See the link above for lots more help on turning your problem into a reproducible example. It’s the single best thing you can do to make getting an answer more likely! :grin:

2 Likes