Generate a clustering description plot from a rainette result
Generate a clustering description plot from a rainette result
rainette_plot( res, dtm, k = NULL, type = c("bar", "cloud"), n_terms = 15, free_scales = FALSE, measure = c("chi2", "lr"), show_negative = TRUE, text_size = NULL )
res |
result object of a |
dtm |
the dfm object used to compute the clustering |
k |
number of groups. If NULL, use the biggest number possible |
type |
type of term plots : barplot or wordcloud |
n_terms |
number of terms to display in keyness plots |
free_scales |
if TRUE, all the keyness plots will have the same scale |
measure |
statistics to compute |
show_negative |
if TRUE, show negative keyness features |
text_size |
font size for barplots, max word size for wordclouds |
A gtable object.
library(quanteda) corpus <- data_corpus_inaugural corpus <- head(corpus, n = 10) corpus <- split_segments(corpus) dtm <- dfm(corpus, remove = stopwords("en"), tolower = TRUE, remove_punct = TRUE) dtm <- dfm_trim(dtm, min_termfreq = 3) res <- rainette(dtm, k = 3) rainette_plot(res, dtm)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.