rwa_read: Read WhatsApp history into R

Description Usage Arguments Details Value Examples

View source: R/rwhatsapp.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

1
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

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

Example output



rwhatsapp documentation built on Jan. 5, 2022, 5:09 p.m.