fars_map_state: Show accident density in a given state

Description Usage Arguments Value

View source: R/fars-functions.R

Description

This is a function that generates a data frame for a given year (years) using the functions make_filename and fars_read and plots the accidents for a given state (state.num). An error message is printed if state.num does not appear in the FARS data set ("invalid STATE number") or if no accidents appeared ("no accidents to plot")

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numerical value corresponding to a state in the FARS data frame

year

A numeric value denoting the year during which data should be gathered

Value

This function plots the location of the accidents on a map of a given state in a given year


piotrp1/fars_tools documentation built on May 25, 2019, 7:14 a.m.