Skip to contents

Distribution (n, mean, median, min, max) of subject-officials, witness-officials, civilian-witnesses, and officers-involved.

Usage

morie_siu_case_counts(data = NULL)

Arguments

data

Either a data frame (e.g. the output of morie_fetch_siu() read in) or a path to SIU_by_case.csv. NULL (the default) looks in file.path(tempdir(), "morie", "siu", "SIU_by_case.csv").

Value

A morie_rich_result list.

Examples

df <- data.frame(
  number_of_subject_officials = c(1L, 2L, 1L, 3L),
  number_of_witness_officials = c(2L, 4L, 1L, 5L),
  number_of_civilian_witnesses = c(0L, 3L, 1L, 2L),
  number_of_officers_involved = c(3L, 6L, 2L, 8L))
r <- morie_siu_case_counts(df)
r$tables[[1]]$rows
#> [[1]]
#> [[1]][[1]]
#> [1] "#Subject officials"
#> 
#> [[1]][[2]]
#> [1] 4
#> 
#> [[1]][[3]]
#> [1] "1.75"
#> 
#> [[1]][[4]]
#> [1] "2"
#> 
#> [[1]][[5]]
#> [1] "1"
#> 
#> [[1]][[6]]
#> [1] "3"
#> 
#> 
#> [[2]]
#> [[2]][[1]]
#> [1] "#Witness officials"
#> 
#> [[2]][[2]]
#> [1] 4
#> 
#> [[2]][[3]]
#> [1] "3.00"
#> 
#> [[2]][[4]]
#> [1] "3"
#> 
#> [[2]][[5]]
#> [1] "1"
#> 
#> [[2]][[6]]
#> [1] "5"
#> 
#> 
#> [[3]]
#> [[3]][[1]]
#> [1] "#Civilian witnesses"
#> 
#> [[3]][[2]]
#> [1] 4
#> 
#> [[3]][[3]]
#> [1] "1.50"
#> 
#> [[3]][[4]]
#> [1] "2"
#> 
#> [[3]][[5]]
#> [1] "0"
#> 
#> [[3]][[6]]
#> [1] "3"
#> 
#> 
#> [[4]]
#> [[4]][[1]]
#> [1] "#Officers involved"
#> 
#> [[4]][[2]]
#> [1] 4
#> 
#> [[4]][[3]]
#> [1] "4.75"
#> 
#> [[4]][[4]]
#> [1] "4"
#> 
#> [[4]][[5]]
#> [1] "2"
#> 
#> [[4]][[6]]
#> [1] "8"
#> 
#>