persons_flags_to_crash: Extract person flags and get to the crash level

View source: R/helper_functions.R

persons_flags_to_crashR Documentation

Extract person flags and get to the crash level

Description

Get a df of crash numbers with crash flags at the crash level. This df can full_join with a crash df. (df = full_join(crash, df, by = "CRSHNMBR"))

Usage

persons_flags_to_crash(persons_df, flag_list = c("speed_flag"))

Arguments

persons_df

person dataframe

flag_list

list of flags c("speed_flag", "distracted_flag", "teendriver_flag", "olderdriver_flag", "impaired_flag", "seatbelt_flag")

Value

df with crash numbers and crash flags

Examples

## Not run: persons_flags_to_crash(p, flag_list =  c("impaired_flag"))

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