get_crash_flags: Get driver flags - deer, crash location, lane departure,...

View source: R/get_crashflags_crash.R

get_crash_flagsR Documentation

Get driver flags - deer, crash location, lane departure, winter road

Description

This adds a column(s) of certain crash flags. Deer and crash location can be for both old and new db. Crash location - old db doesn't include parking lot/private property crashes. Lane departure and winter road is for new db only. Must have c("CRSHTYPE", "ANMLTY") for deer. c("RLTNTRWY", "CRSHLOC", "INTTYPE", "INTDIS") for crash location. c("CRSHTYPE", "MNRCOLL") for lane departure. c("RDCOND") for winter road.

Usage

get_crash_flags(crash_df, flags)

Arguments

crash_df

crash df

flags

c("deer","location","lanedeparture", "winterroad")

Value

Adds a column of selected flag(s) with deer_flag, lanedep_flag, winterroad_flag. ("Y" or "N"). crash_location with c("parking lot", "private property", "intersection", "non-intersection")

Examples

## Not run: get_crash_flags(crash_df, flags = c("deer", "lanedeparture"))

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