plot_media {WhatsR} | R Documentation |
Visualizing media files in 'WhatsApp' chat logs if chats were exported with media files
Description
Creates summary data frames or visualizations of sent media files or file types
Usage
plot_media(
data,
names = "all",
starttime = "1960-01-01 00:00",
endtime = "2200-01-01 00:00",
use_filetype = TRUE,
min_occur = 1,
return_data = FALSE,
media_vec = "all",
plot = "bar",
exclude_sm = FALSE
)
Arguments
data |
A 'WhatsApp' chatlog that was parsed with |
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 |
endtime |
Datetime that is used as the maximum boundary for exclusion. Is parsed with |
use_filetype |
If TRUE, shortens sent file attachments to file types. |
min_occur |
The minimum number of occurrences a media (type) has to have to be included in the visualization. Default is 1. |
return_data |
If TRUE, returns the subset data frame. Default is FALSE. |
media_vec |
A vector of media (types) that the visualizations will be restricted to. |
plot |
The type of plot that should be returned Options include "heatmap", "cumsum", "bar" and "splitbar". |
exclude_sm |
If TRUE, excludes the 'WhatsApp' system messages from the descriptive statistics. Default is FALSE. |
Value
Plots and/or the subset data frame based on author names, datetime and media (type) occurrence
Examples
data <- readRDS(system.file("ParsedWhatsAppChat.rds", package = "WhatsR"))
plot_media(data, plot = "heatmap")