Rachel Tatman has a great tutorial introducing sentiment analysis in R:
By the end of this tutorial you will:
- Understand what sentiment analysis is and how it works
- Read text from a dataset & tokenize it
- Use a sentiment lexicon to analyze the sentiment of texts
- Visualize the sentiment of text
If you’re the hands-on type, you might want to head directly to the notebook for this tutorial. You can fork it and have your very own version of the code to run, modify and experiment with as we go along.
Check it out. There’s a lot more to sentiment analysis—cleaning and tokenizing words, getting context right, etc.—but this is a very nice introduction.