gramcloud | R Documentation |
Plots wordcloud based on words and/or ngrams.
gramcloud(x = NULL, ngram = 1, max.num = 100, min.freq = 1, equal.shares = T, delete = T, lowerCase = T, main = "Cloud of n-grams", color = "red", random.order = FALSE, rot.per = 0.2, scale = c(4, 0.5), use.r.layout = T, ordered.colors = T, ...)
x |
Character vector containing the text of documents. |
ngram |
Numeric value that determines the maximum order of ngrams that is plotted. Defaults to 1. |
max.num |
Numeric value that determines the maximum number of ngrams plotted. Defaults to 100. |
min.freq |
Numeric value that determines the minimum number of occurences for a word or ngram to be plotted. Defaults to 1. |
equal.shares |
Logical value indicating whether the size of a word or ngram should be relative to all tokens of the same ngram-order (T) or corresponding to the least frequent constituting word or ngram (F). Defaults to T. |
delete |
Logical value indicating whether ngrams of lower order should be deleted if they are part of an ngram of higher order that is plotted. Defaults to T. |
lowerCase |
Logical value indicating whether x should be transformed to lower-case. Defaults to T. |
color |
Color of the most frequent ngram. Defaults to "red". |
... |
Additional graphical parameters for wordcloud. |
Plots wordcloud based on words and/or ngrams. By default words that are part of plotted ngrams are not plotted (delete=T).
gramcloud(c("This is an exemplary text","This is too","And this is probably the longest text"),ngram=2,min.freq=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.