View source: R/helper_functions.R
count_crash_flags | R Documentation |
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.
count_crash_flags(crash_df, flag_list, by_variables = "year")
crash_df |
crash dataframe |
flag_list |
list of crash flags to count |
by_variables |
variables to count by, c("year", "CRSHSVR") |
long df of crash counts
## Not run: count_crash_flags(df, person_flags_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.