Visualizes the reply times and reaction times to messages per author

plot_replytimes(
  data,
  names = "all",
  starttime = "1960-01-01 00:00",
  endtime = "2200-01-01 00:00",
  return_data = FALSE,
  aggregate_sessions = TRUE,
  plot = "box",
  type = "replytime",
  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.

return_data

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

aggregate_sessions

If TRUE, concurrent messages of the same author are aggregated into one session. Default is TRUE.

plot

Type of plot to be returned, options are "box" and "heatmap".

type

If "replytime", plots display how much time it takes authors to reply to previous message, if "reactiontime", plots display how much time it takes for authors to get responded to.

exclude_sm

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

Value

Plots for Replytimes or Reactiontimes of authors. Input will be ordered by TimeOrder column.

Examples

data <- readRDS(system.file("ParsedWhatsAppChat.rds", package = "WhatsR"))
plot_replytimes(data)
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: Removed 1 rows containing non-finite values (`stat_boxplot()`).

#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: Removed 1 rows containing non-finite values (`stat_boxplot()`).