plot

0th

Percentile

Visualize a Term-Document Matrix

Visualize correlations between terms of a term-document matrix.

Usage
"plot"(x, terms = sample(Terms(x), 20), corThreshold = 0.7, weighting = FALSE, attrs = list(graph = list(rankdir = "BT"), node = list(shape = "rectangle", fixedsize = FALSE)), ...)
Arguments
x
A term-document matrix.
terms
Terms to be plotted. Defaults to 20 randomly chosen terms of the term-document matrix.
corThreshold
Do not plot correlations below this threshold. Defaults to 0.7.
weighting
Define whether the line width corresponds to the correlation.
attrs
Argument passed to the plot method for class graphNEL.
...
Other arguments passed to the graphNEL plot method.
Details

Visualization requires that package Rgraphviz is available.

Aliases
  • plot.TermDocumentMatrix
Examples
## Not run: data(crude)
# tdm <- TermDocumentMatrix(crude,
#                           control = list(removePunctuation = TRUE,
#                                          removeNumbers = TRUE,
#                                          stopwords = TRUE))
# plot(tdm, corThreshold = 0.2, weighting = TRUE)## End(Not run)
Documentation reproduced from package tm, version 0.6-2, License: GPL-3

Community examples

Looks like there are no examples yet.