plot_wordlist_counts: Plot a Wordlist

View source: R/plots.R

plot_wordlist_countsR Documentation

Plot a Wordlist

Description

Plot a Wordlist

Usage

plot_wordlist_counts(
  wl,
  direction = 1,
  x = c("date", "box", "group"),
  colour = c("box", "group"),
  date_range = NULL,
  language = c("en", "de"),
  interactive = rlang::is_installed("plotly")
)

Arguments

wl

a wordlist object

direction

which direction to analyse. This can be given as an integer (1: query left column; 2: query right column) or as a character string indicating the query language as it is stored in the wordlist.

x

the variable to be used for the x-axis

colour

the variable used for colour

date_range

date vector of length to giving the data range to be plotted. If omitted, all the data is plotted.

language

language for the plot labels

interactive

create an interactive plot? This requires 'plotly' and is set to 'TRUE' by default, if 'plotly' is installed. If set to 'TRUE' by the user, the function will ask to install 'plotly' if no existing installation is found.

Value

A 'ggplot2' or 'plotly' plot.


stibu81/WordBox documentation built on Nov. 28, 2024, 2:29 p.m.