plot_wordcloud {WhatsR} | R Documentation |
Wordclouds for 'WhatsApp' chat logs
Description
Creates a wordcloud by author for 'WhatsApp' chat logs. Requires raw message text to be present in data.
Usage
plot_wordcloud(
data,
names = "all",
starttime = "1960-01-01 00:00",
endtime = "2200-01-01 00:00",
remove_stops = TRUE,
stop = "english",
comparison = FALSE,
return_data = FALSE,
font_size = 10,
min_occur = 5,
exclude_sm = FALSE
)
Arguments
data |
A 'WhatsApp' chat log 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 |
remove_stops |
Either TRUE or FALSE, default is TRUE. Configures whether stopwords from |
stop |
The language for stopword removal. Stopwords are taken from |
comparison |
Must be TRUE or FALSE. If TRUE, will split up wordcloud by sender. Default is FALSE. |
return_data |
Will return the data frame used to create the plot if TRUE. Default is FALSE. |
font_size |
Size of the words in the wordcloud, passed to |
min_occur |
Sets the minimum frequency a token must occur in the chat for it to be included in the plot. Default is 5. |
exclude_sm |
If TRUE, excludes the 'WhatsApp' system messages from word clouds. Default is FALSE. |
Value
A wordcloud plot per author for 'WhatsApp' chat logs
Examples
data <- readRDS(system.file("ParsedWhatsAppChat.rds", package = "WhatsR"))
plot_wordcloud(data, comparison = TRUE, min_occur = 6)