Skip to content

Instantly share code, notes, and snippets.


Sean Norton stnorton

View GitHub Profile
stnorton / R2MALLET.r
Created Nov 14, 2019 — forked from benmarwick/R2MALLET.r
R code to operate MALLET entirely from within R. Set variables, send commands to Windows' command console and get MALLET's result back into R for further analysis.
# Set working directory
dir <- "C:\\" # adjust to suit
# configure variables and filenames for MALLET
## here using MALLET's built-in example data and
## variables from
# folder containing txt files for MALLET to work on
importdir <- "C:\\mallet-2.0.7\\sample-data\\web\\en"