Summarizing the distribution of tokens for sent messages

summarize_tokens_per_person(
  data,
  names = "all",
  starttime = "1960-01-01 00:00",
  endtime = "2200-01-01 00:00",
  exclude_sm = FALSE
)

Arguments

data

A 'WhatsApp' chat log that was parsed with parse_chat.

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 as.POSIXct. Standard format is "yyyy-mm-dd hh:mm". Is interpreted as UTC to be compatible with 'WhatsApp' timestamps.

endtime

Datetime that is used as the maximum boundary for exclusion. Is parsed withas.POSIXct. Standard format is "yyyy-mm-dd hh:mm". Is interpreted as UTC to be compatible with 'WhatsApp' timestamps.

exclude_sm

If TRUE, excludes the 'WhatsApp' system messages from the descriptive statistics. Default is FALSE.

Value

A summary of tokens per message distribution per author

Examples

data <- readRDS(system.file("ParsedWhatsAppChat.rds", package = "WhatsR"))
summarize_tokens_per_person(data)
#> $`WhatsApp System Message`
#> $`WhatsApp System Message`$Timespan
#> $`WhatsApp System Message`$Timespan$Start
#> [1] "2018-01-29 12:24:00 UTC"
#> 
#> $`WhatsApp System Message`$Timespan$End
#> [1] "2018-01-30 00:23:00 UTC"
#> 
#> 
#> $`WhatsApp System Message`$TokenStats
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>       1       1       1       1       1       1 
#> 
#> 
#> $Mallory
#> $Mallory$Timespan
#> $Mallory$Timespan$Start
#> [1] "2018-01-29 12:24:00 UTC"
#> 
#> $Mallory$Timespan$End
#> [1] "2018-01-30 00:23:00 UTC"
#> 
#> 
#> $Mallory$TokenStats
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>       1       1       1       1       1       1 
#> 
#> 
#> $Dave
#> $Dave$Timespan
#> $Dave$Timespan$Start
#> [1] "2018-01-29 12:24:00 UTC"
#> 
#> $Dave$Timespan$End
#> [1] "2018-01-30 00:23:00 UTC"
#> 
#> 
#> $Dave$TokenStats
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>    2.00    2.00    4.50    4.75    7.25    8.00 
#> 
#> 
#> $Alice
#> $Alice$Timespan
#> $Alice$Timespan$Start
#> [1] "2018-01-29 12:24:00 UTC"
#> 
#> $Alice$Timespan$End
#> [1] "2018-01-30 00:23:00 UTC"
#> 
#> 
#> $Alice$TokenStats
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>   1.000   1.000   4.000   7.385   5.000  51.000 
#> 
#> 
#> $Bob
#> $Bob$Timespan
#> $Bob$Timespan$Start
#> [1] "2018-01-29 12:24:00 UTC"
#> 
#> $Bob$Timespan$End
#> [1] "2018-01-30 00:23:00 UTC"
#> 
#> 
#> $Bob$TokenStats
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>   1.000   3.000   6.000   9.684  11.500  51.000 
#> 
#> 
#> $Carol
#> $Carol$Timespan
#> $Carol$Timespan$Start
#> [1] "2018-01-29 12:24:00 UTC"
#> 
#> $Carol$Timespan$End
#> [1] "2018-01-30 00:23:00 UTC"
#> 
#> 
#> $Carol$TokenStats
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>     1.0     3.0     7.0    14.8    12.0    51.0 
#> 
#>