rwa_read {rwhatsapp}R Documentation

Read WhatsApp history into R

Description

Takes a history file from the “WhatsApp” messenger app (txt or zip) and returns a formatted data.frame with descriptions of the used emojis.

Usage

rwa_read(x, tz = NULL, format = NULL, verbose = FALSE, encoding = "UTF-8", ...)

Arguments

x

Path to a txt or zip file of a WhatsApp history or the history itself as character object.

tz

A time zone for date conversion. Set NULL or "" for the default time zone or a single string with a timezone identifier, see stri_timezone_list.

format

Most formats are automatically detected. If you encounter problems you can provide a custom format here. Refer to stri_datetime_parse for guidance.

verbose

A logical flag indicating whether information should be printed to the screen.

encoding

Input encoding. Should usually be "UTF-8" if files haven't changed since export from WhatsApp.

...

Further arguments passed to readLines.

Details

The history can be obtained going to the menu in a chat on the “WhatsApp” app, choosing "more", then "Export chat".

Value

A tibble with the information parsed from the history file.

Examples

history <- system.file("extdata", "sample.txt", package = "rwhatsapp")
df <- rwa_read(history)

[Package rwhatsapp version 0.2.4 Index]