Learn R Programming

topics

Overview

An R-package for analyzing natural language implementing Differential Language Analysis using words, phrases and topics. Check out our tutorial paper: Multiple Methods for Visualizing Human Language: A Tutorial for Social and Behavioural Scientists. If you use the topics package, please cite this tutorial in your work. The topics package is part of the R Language Analysis Suite, including talk, text and topics.

  • talk transforms voice recordings into text, audio features, or embeddings.
  • text provides many language tasks such as converting digital text into word embeddings. talk and text offer access to Large Language Models from Hugging Face.
  • topics visualizes language patterns into words, phrases or topics to generate psychological insights. The topics package supports the text package in analysing and visualizing topics from BERTtopics.

When using the topics package, please cite:

Ackermann L., Zhuojun G. & Kjell O.N.E. (2024). An R-package for visualizing text in topics. https://github.com/theharmonylab/topics. DOI:zenodo.org/records/11165378.

Copy Link

Version

Install

install.packages('topics')

Version

1.0

License

GPL-3

Maintainer

Oscar Kjell

Last Published

June 13th, 2026

Functions in topics (1.0)

topicsTest

Test topics or n-grams
topicsTutorialData

Download and Prepare Tutorial Data
topicsDtmEval

Summarize and Visualize your Document Term Matrix
topicsPlot

Plot word clouds
topicsDtm

Document Term Matrix
topicsGridLegend

Plot a grid (matrix) legend (available for the text-package)
topicsPlotOverview

Combine topics and distribution legend into an overview figure (experimental)
topicsGrams

N-grams
topicsScatterLegend

Plot a distribution plot (available for the text-package)
topicsPredict

topicsPredict, topicsPreds, topicsAssess and topicsClassify
dep_wor_data

Example data about mental health descirptions .
topicsModel

Topic modelling