Learn R Programming

textreg (version 0.1.3)

cluster.phrases: Cluster phrases based on similarity of appearance.

Description

Cluster phrases based on similarity of their appearance in the positive documents. Can also plot this if so desired.

Uses hclust() with the ``ward.D'' method on 1-S with S from make.similarity.matrix

Warning: for 'negative weight' phrases this method does not do well since it ignores negative documents.

Usage

cluster.phrases(result, num.groups = 5, plot = TRUE, yaxt = "n", ylab = "", sub = "", main = "Association of Phrases", ...)

Arguments

result
A similarity matrix from make.similarity.matrix call or an textreg.result object
num.groups
Number of groups to box.
plot
Actually plot clustering or just calculate it.
yaxt
Whether to include a y-axis
ylab
Label for y-axis
sub
Subtitle for plot
main
Title of plot.
...
Extra arguments to pass to the plot command. See par.

See Also

Other Phrase Vizualization: make.appearance.matrix; make.phrase.correlation.chart; make.similarity.matrix