fars_map_state: Plots a state map of accidents for a specific year

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

fars_map_state Plots a state map with all the accident locations that had happened during the input year. All longitudinal and latitudinal values are filtered to make sure they fall within standard intervals.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

integer representing the state number for which the accident map will be generated

year

input value of the year for which we'll plot the accidents for the selected state

Value

A plot of all accident locations rendered on the map of the input state. A invalid STATE number message will be displayed if state.num input value is not found in the input file. If no accidents happened in that state during that calendar year, a no accidents to plot will be displayed instead of the plot.

Examples

1
2
## Not run: fars_map_state(1,2014)
## Not run: fars_map_state(3,2015)

adigherman/fars documentation built on May 7, 2019, 2:54 a.m.