From 763f74ea0b3c54640b69f26067e2a440d76214e7 Mon Sep 17 00:00:00 2001 From: JBGruber Date: Sun, 15 Sep 2019 09:46:53 +0100 Subject: [PATCH] Final changes to documentation before release --- DESCRIPTION | 13 +++++++------ R/rwhatsapp.R | 17 +++++++++++------ README.md | 2 +- man/emojis.Rd | 8 +++++--- man/rwa_read.Rd | 10 +++++++--- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e8b474c..2e93eea 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,12 @@ Package: rwhatsapp -Title: Working with WhatsApp data -Version: 0.1.5.9000 -Date: 2019-09-14 -Authors@R: person("Johannes", "Gruber", email = "j.gruber.1@research.gla.ac.uk", +Title: Import and Handling for 'WhatsApp' Chat Logs +Version: 0.2.0 +Date: 2019-09-15 +Authors@R: person("Johannes", "Gruber", email = "j.gruber.1@research.gla.ac.uk", role = c("aut", "cre")) -Description: A straightforward parsing package which digests history files from - the popular messenger service "WhatsApp" in all locales and from all devices. +Description: A straightforward, easy-to-use and robust parsing package which digests + history files from the popular messenger service 'WhatsApp' in all locales and + from all devices. Depends: R (>= 3.4.0) License: GPL-3 diff --git a/R/rwhatsapp.R b/R/rwhatsapp.R index 2eb2080..73826fd 100755 --- a/R/rwhatsapp.R +++ b/R/rwhatsapp.R @@ -1,7 +1,10 @@ #' Read WhatsApp history into R #' -#' The history can be obtained going to the menu in a chat on the WhatsApp app, -#' choosing "more", then "Export chat". +#' Takes a history file from the ``WhatsApp'' messenger app and returns a +#' formatted data.frame with descriptions of the used emojis. +#' +#' @details The history can be obtained going to the menu in a chat on the +#' ``WhatsApp'' app, choosing "more", then "Export chat". #' #' @param x Path to a txt or zip file of a WhatsApp history or the history #' itself as character object. @@ -15,7 +18,7 @@ #' printed to the screen. #' @param ... Further arguments passed to \link[stringi]{stri_read_lines}. #' -#' @return a tibble +#' @return A tibble with the information parsed from the history file. #' @export #' @import stringi #' @importFrom tibble tibble @@ -332,8 +335,10 @@ f_exist_s <- function(x) { #' A dataset containing emojis and corresponding descriptions. This is a subset #' of the emojis provided by the emo package. #' -#' @format A tibble with 3570 rows and 2 columns -#' - emoji: character representation of the emoji -#' - name: name of the emoji +#' @format A tibble with 3570 rows and 2 columns: +#' \itemize{ +#' \item emoji: character representation of the emoji +#' \item name of the emoji +#' } #' @source \url{https://github.com/hadley/emo/} "emojis" diff --git a/README.md b/README.md index 18ba9f3..02bbcda 100755 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ capabilities. Furthermore, retrieving chat logs from the Android or iOS app is very straightforward: Simply choose `More` in the menu of a chat, then `Export chat` and export the history to a txt file. - + This package is intended make the first step of analysing WhatsApp text data as easy as possible—reading your chat history into `R`. This should diff --git a/man/emojis.Rd b/man/emojis.Rd index 7e7e480..d1c9a94 100644 --- a/man/emojis.Rd +++ b/man/emojis.Rd @@ -4,9 +4,11 @@ \name{emojis} \alias{emojis} \title{List of emojis and corresponding descriptions.} -\format{A tibble with 3570 rows and 2 columns -- emoji: character representation of the emoji -- name: name of the emoji} +\format{A tibble with 3570 rows and 2 columns: +\itemize{ + \item emoji: character representation of the emoji + \item name of the emoji +}} \source{ \url{https://github.com/hadley/emo/} } diff --git a/man/rwa_read.Rd b/man/rwa_read.Rd index 6d3d9a2..a8b59ae 100644 --- a/man/rwa_read.Rd +++ b/man/rwa_read.Rd @@ -24,11 +24,15 @@ printed to the screen.} \item{...}{Further arguments passed to \link[stringi]{stri_read_lines}.} } \value{ -a tibble +A tibble with the information parsed from the history file. } \description{ -The history can be obtained going to the menu in a chat on the WhatsApp app, -choosing "more", then "Export chat". +Takes a history file from the ``WhatsApp'' messenger app and returns a +formatted data.frame with descriptions of the used emojis. +} +\details{ +The history can be obtained going to the menu in a chat on the + ``WhatsApp'' app, choosing "more", then "Export chat". } \examples{ history <- system.file("extdata", "sample.txt", package = "rwhatsapp")