Matthew Jockers has created syuzhet, “an R package for the extraction of sentiment and sentiment-based plot arcs from text.” The first CRAN release is available, and the package is on GitHub. Jockers has an introductory blog post on “Revealing Sentiment and Plot Arcs with the Syuzhet Package” which has a useful explanation of his method. I’ve been using the package myself for exploring sentiment and plot in the nineteenth-century publications of the American Tract Society.