Skip to contents

Generate word cloud plots of response frequencies for associatoR object.

Usage

ar_plot_wordcloud(
  associations,
  facet_col = cluster,
  facet_row = NULL,
  color_by = cluster,
  top_n = 30,
  ...
)

Arguments

associations

an associatoR object containing association data as generated by ar_import with targets defined by ar_set_targets.

facet_col

name of variable to generate column facets by.

facet_row

name of variable to generate row facets by.

color_by

name of variable used to color the words.

top_n

a integer value specifying the number of highest frequency words to display.

...

optional arguments passed on to geom_text_wordcloud.

Value

Returns a ggplot plot object.

Examples

ar_import(intelligence,
          participant = participant_id,
          cue = cue,
          response = response,
          participant_vars = c(gender, education),
          response_vars = c(response_position, response_level)) %>%
  ar_set_targets("cues") %>%
  ar_plot_wordcloud(facet_col = gender,
                    top_n = 10,
                    color_by = NULL)