Skip to contents

Create a g6tr themed wordcloud with the option to remove stopwords

Usage

tm_wordcloud(
  df,
  var,
  clean_text = TRUE,
  shape = "diamond",
  min_freq = 10,
  max_words = 100,
  ...
)

Arguments

df

a dataframe object

var

Variable name (character vector) to create a wordcloud of

clean_text

Cleans text if TRUE

shape

Shape of the wordlcoud as specified in ggwordcloud

min_freq

Minimum frequency of the word as specified in ggwordcloud

max_words

Maximum number of words as specified in ggwordcloud

...

Further arguments to ggwordcloud

Value

A ggplot object

Examples


library(janeaustenr)
library(ggplot2)
library(dplyr)
df <-
  austen_books() %>%
  filter(book == "Sense & Sensibility")

tm_wordcloud(
  df = df,
  var = "text"
)