wordcloud: Internal function for textplot_wordcloud

View source: R/textplot_wordcloud.R

wordcloudR Documentation

Internal function for textplot_wordcloud

Description

This function implements wordcloud without dependencies. Code is adopted from wordcloud::wordcloud().

Usage

wordcloud(
  x,
  min_size,
  max_size,
  min_count,
  max_words,
  color,
  font,
  adjust,
  rotation,
  random_order,
  random_color,
  ordered_color,
  labelcolor,
  labelsize,
  labeloffset,
  fixed_aspect,
  colors,
  scale,
  min.freq,
  max.words,
  random.order,
  random.color,
  rot.per,
  ordered.colors,
  use.r.layout,
  fixed.asp,
  ...
)

Arguments

x

a dfm or quanteda.textstats::textstat_keyness object

min_size

size of the smallest word

max_size

size of the largest word

min_count

words with frequency below min_count will not be plotted

max_words

maximum number of words to be plotted. The least frequent terms dropped. The maximum frequency will be split evenly across categories when comparison = TRUE.

color

colour of words from least to most frequent

font

font-family of words and labels. Use default font if NULL.

adjust

adjust sizes of words by a constant. Useful for non-English words for which R fails to obtain correct sizes.

rotation

proportion of words with 90 degree rotation

random_order

plot words in random order. If FALSE, they will be plotted in decreasing frequency.

random_color

choose colours randomly from the colours. If FALSE, the colour is chosen based on the frequency

ordered_color

if TRUE, then colours are assigned to words in order.

labelcolor

colour of group labels. Only used when comparison = TRUE.

labelsize

size of group labels. Only used when comparison = TRUE.

labeloffset

position of group labels. Only used when comparison = TRUE.

fixed_aspect

logical; if TRUE, the aspect ratio is fixed. Variable aspect ratio only supported if rotation = 0.

scale

deprecated argument

min.freq

deprecated argument

max.words

deprecated argument

random.order

deprecated argument

random.color

deprecated argument

rot.per

deprecated argument

ordered.colors

deprecated argument

use.r.layout

deprecated argument

fixed.asp

deprecated argument

...

additional parameters. Only used to make it compatible with wordcloud

Author(s)

Kohei Watanabe, building on code from Ian Fellows's wordcloud package.


quanteda.textplots documentation built on Sept. 11, 2024, 5:35 p.m.