Chains mrm_uof_weapon_diversity over
Weapon x Location (the only two categorical columns the file
publishes) plus a Weapon-only frequency table plus a data-quality
audit.
Usage
morie_arsau_analyze_weapon_records(
year,
allow_invalid = FALSE,
language = "en",
data_dir = NULL
)References
Ontario Ministry of the Solicitor General, ARSAU 2023 and 2024 weapon_records technical notes – the 2023 release accompanies an explicit invalidity flag.
Examples
# \donttest{
res <- try(morie_arsau_analyze_weapon_records(year = "2024"))
if (!inherits(res, "try-error")) print(res)
#> ARSAU weapon_records analysis (2024)
#> ====================================
#> Call: morie_arsau_analyze_weapon_records(year=‘2024’, allow_invalid=FALSE)
#>
#> Year/range 2024
#> Kind weapon_records
#> Rows analysed 5
#> Columns analysed 5
#> Valid yes
#> Sub-analyses 3
#>
#> Warning: [weapon_x_location] 20 of 20 expected cell(s) below 5; chi-square approximation may be unreliable.
#>
#> Ran 3 sub-analysis(es) over the ARSAU 'weapon_records' dataset for '2024': weapon_x_location, weapon_frequencies, data_quality. Each sub-result is available as `result$<name>` and the underlying data.frame as `result$data`.
# }
