count_crash_flags: Get crash count by crash flags

View source: R/helper_functions.R

count_crash_flagsR Documentation

Get crash count by crash flags

Description

Have a list of crash flags and this function will count each number of crashes by crash flag, with the option to also count by other variables, such as year.

Usage

count_crash_flags(crash_df, flag_list, by_variables = "year")

Arguments

crash_df

crash dataframe

flag_list

list of crash flags to count

by_variables

variables to count by, c("year", "CRSHSVR")

Value

long df of crash counts

Examples

## Not run: count_crash_flags(df, person_flags_list)

jacciz/wisdotcrashdatabase documentation built on June 3, 2023, 2:26 a.m.