R is a statistical programming language that has recently seen increased used in text analysis. RStudio is the Integrated Development Environment (IDE) for working on R projects.
R's powerful data analysis tools thrive on what is known as "unstructured data," and from a data perspective, narrative writing is so much "unstructured text." R has two packages designed specifically for unstructured text: Sentiment (now archived, but still usable) and TM. In addition to these two packages, text analysts and digital humanists continue to discover novel and exciting ways to use R's powerhouse of data tools for text analysis:
Text Analysis Resources
Text Analysis with R for Students of Literature
R Basics with Tabular Data
Text Mining with R
Julia Silge & David Robinson
For general questions about programming in R, the R-Bloggers community is the go-to resource. StackOverflow is another helpful troubleshooting community, and you may find yourself asking questions of your own as you begin new projects.