R.temis (version 0.1.3)

word_cloud: word_cloud

Description

Plot a word cloud from a document-term matrix.

Usage

word_cloud(dtm, n = 50, remove_stopwords = TRUE, ...)

Arguments

dtm

A DocumentTermMatrix object.

n

The maximum number of words to plot.

remove_stopwords

Whether to remove stopwords appearing in a language-specific list (see tm::stopwords).

...

Additional arguments passed to wordcloud.

Examples

Run this code
# NOT RUN {
file <- system.file("texts", "reut21578-factiva.xml", package="tm.plugin.factiva")
corpus <- import_corpus(file, "factiva", language="en")
dtm <- build_dtm(corpus)
word_cloud(dtm)

# }

Run the code above in your browser using DataLab