reinPlot | R Documentation |
This function creates a horizontal bar plot to visualize the most significant terms for each cluster, based on their Chi-squared statistics.
reinPlot(terms, nPlot = 10)
terms |
A data frame containing terms and their associated statistics, such as Chi-squared values,
generated by the
|
nPlot |
Integer. The number of top terms to plot for each sign ( |
The function organizes the input data by Chi-squared values and selects the top terms for each sign. The plot uses different colors for positive and negative terms, with hover tooltips providing detailed information.
An interactive horizontal bar plot (using plotly
) displaying the top terms for each cluster. The plot includes:
Bars representing the Chi-squared values of terms.
Hover information displaying the term and its Chi-squared value.
term_per_cluster
## Not run:
data(mobydick)
res <- reinert(
x = mobydick,
k = 10,
term = "token",
segment_size = 40,
min_segment_size = 5,
min_split_members = 10,
cc_test = 0.3,
tsj = 3
)
tc <- term_per_cluster(res, cutree = NULL, k = 1, negative = FALSE)
fig <- reinPlot(tc$terms, nPlot = 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.