R Text Analysis

r
text-analysis
topic-models
tidytext
lda
stm
quanteda
text-mining
Books, tutorials, topic modeling guides, regular expression tools, and packages for analyzing text in R.
Published

31 October 2026

This guide collects material for analyzing text with R, from cleaning strings and regular expressions to word frequencies and topic models. Begin with the three picks under Start here, then use the sections on tidy text, topic modeling, regular expressions, and packages as your project needs them. Installation steps are on the R page.

Start here

Tidy text and tutorials

Topic modeling

Text mining frameworks

Regular expressions

Text packages

Package What it does
SnowballC R interface to the Snowball word stemmers
hunspell Stems words, tokenizes text, and checks spelling
readtext Reads text files into R
jstor Imports journal data from JSTOR’s Data for Research
textreuse Detects text reuse and document similarity
spelling Checks spelling in text and documents
cld3 Detects the language of a text with Google’s Compact Language Detector 3
youtubecaption Downloads YouTube subtitles into a tidy data frame
textclean Cleans and normalizes text data
citation-network Builds a quick cross-citation network for a set of texts