Plots the smilies used in 'WhatsApp' chat logs by sender

plot_smilies(
  data,
  names = "all",
  starttime = "1960-01-01 00:00",
  endtime = "2200-01-01 00:00",
  min_occur = 1,
  return_data = FALSE,
  smilie_vec = "all",
  plot = "bar",
  exclude_sm = FALSE
)

Arguments

data

A 'WhatsApp' chat log that was parsed with parse_chat.

names

A vector of author names that the plots will be restricted to.

starttime

Datetime that is used as the minimum boundary for exclusion. Is parsed with as.POSIXct. Standard format is "yyyy-mm-dd hh:mm". Is interpreted as UTC to be compatible with 'WhatsApp' timestamps.

endtime

Datetime that is used as the maximum boundary for exclusion. Is parsed with as.POSIXct. Standard format is "yyyy-mm-dd hh:mm". Is interpreted as UTC to be compatible with 'WhatsApp' timestamps.

min_occur

The minimum number of occurrences a smiley has to have to be included in the visualization. Default is 1.

return_data

If TRUE, returns a data frame of smilies extracted from the chat for more elaborate plotting. Default is FALSE.

smilie_vec

A vector of smilies that the visualizations will be restricted to.

plot

The type of plot that should be returned. Options are "heatmap", "cumsum", "bar" and "splitbar".

exclude_sm

If TRUE, excludes the 'WhatsApp' system messages from the data. Default is FALSE.

Value

Plots for distribution of smilies in 'WhatsApp' chats

Examples

data <- readRDS(system.file("ParsedWhatsAppChat.rds", package = "WhatsR"))
plot_smilies(data)