Learn R Programming

stm (version 1.0.1)

plotRemoved: Produces a plot of number of words, documents, and tokens removed by prepDocuments for different threshholds.

Description

For a lower threshold, prepDocuments will drop words which appear in fewer than that number of documents, and remove documents which contain no more words. countRemoved allows the user to pass a vector of lower thresholds and observe how prepDocuments will handle each threshold. This function produces three plots, showing the number of words, the number of documents, and the total number of tokens removed as a function of threshold values.

Usage

plotRemoved(documents, vocab, meta, lower.thresh)

Arguments

documents
The documents to be used for the stm model
vocab
The vocabulary to be used for the stm model
meta
The metadata to be used for the stm model
lower.thresh
A vector of integers, each of which will be tested as a lower threshold for the prepDocuments function.

Details

This function produces a plot, and does not return values.

Examples

Run this code
lower.thresh<-seq(from = 10, to = 1000, by = 10)
plotRemoved(docs, vocab, meta, lower.thresh)

Run the code above in your browser using DataLab