The topics package relies on Java for
high-performance processing. To ensure a smooth installation, please
follow these two steps.
Before installing the R package, you must have the Java Runtime Environment (JRE) installed on your computer. 1. Download Java from here or www.java.com/en/download/. 2. Restart your computer after installation to ensure R can detect the new system paths.
Open R or RStudio and run the following commands.
You can also install the development version from GitHub.
Topic modeling is memory-intensive. You must increase the Java memory limit before loading the library. If you skip this, you may encounter OutOfMemoryError during model training.
# Set memory limit to 5GB (Run this BEFORE loading the library)
options(java.parameters = "-Xmx5000m")
library(topics)