21.1 Text Mining Setup
20180603 Packages used in this chapter include RColorBrewer (Neuwirth 2022), dplyr (Wickham, François, et al. 2026), ggplot2 (Wickham, Chang, et al. 2026), qdap (Rinker 2025), qdapDictionaries (Rinker 2018), scales (Wickham, Pedersen, and Seidel 2025), stringr (Wickham 2025), tm (Feinerer and Hornik 2026), wordcloud (Fellows 2018), and rattle (G. Williams 2026).
Packages are loaded into the currently running R session from your
local library directories on disk. Missing packages can be installed
using utils::install.packages() within R. On Ubuntu, for
example, R packages can also be installed using $ wajig install r-cran-<pkgname>.
# Load required packages from local library into the R session.
library(RColorBrewer) # Generate palette of colours for plots.
library(dplyr) # Data wrangling, pipe operator %>%().
library(ggplot2) # Plot word frequencies.
library(qdap) # Quantitative discourse analysis of transcripts.
library(qdapDictionaries)
library(rattle) # Support: riskchart() errorMatrix().
library(scales) # Support: commas(), percent().
library(stringr) # str_replace_all().
library(tm) # Framework for text mining.
library(wordcloud)References
Feinerer, Ingo, and Kurt Hornik. 2026. Tm: Text Mining Package. https://tm.r-forge.r-project.org/.
Fellows, Ian. 2018. Wordcloud: Word Clouds. http://blog.fellstat.com/?cat=11.
Neuwirth, Erich. 2022. RColorBrewer: ColorBrewer Palettes. https://doi.org/10.32614/CRAN.package.RColorBrewer.
Rinker, Tyler. 2018. qdapDictionaries: Dictionaries and Word Lists for the Qdap Package. http://trinker.github.com/qdapDictionaries/.
———. 2025. Qdap: Bridging the Gap Between Qualitative Data and Quantitative Analysis. https://trinker.github.io/qdap/.
———. 2025. Stringr: Simple, Consistent Wrappers for Common String Operations. https://stringr.tidyverse.org.
Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, Dewey Dunnington, and Teun van den Brand. 2026. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://ggplot2.tidyverse.org.
Wickham, Hadley, Romain François, Lionel Henry, Kirill Müller, and Davis Vaughan. 2026. Dplyr: A Grammar of Data Manipulation. https://dplyr.tidyverse.org.
Wickham, Hadley, Thomas Lin Pedersen, and Dana Seidel. 2025. Scales: Scale Functions for Visualization. https://scales.r-lib.org.
Williams, Graham. 2026. Rattle: R Data Science Supporting Rattle. https://togaware.com/projects/rattle/.
If you find this curated material useful then you can consider a donation to support it's ongoing availability and give you access to the PDF version of this book. The material has been scoped up by Generative AI without permission or any kind of recompense so do consider a donation if you can afford it. Unlike Generative AI your access to this materials is freely given. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Togaware has a 30 year tradition of making popular open source software which includes sold privacy preserving productivity apps, rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0