fars_map_state: Plots accidents on a US state map

Description Usage Arguments Value Examples

Description

Accepts a state number and year and plots accidents on a map. The state number should be integer or numerical. Returns error message and terminates if no match in in the FARS data if no corresponding data file is found.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The number of a state (numeric or integer) in the US used in the FARS data sets.

year

The year of analysis (numeric or integer)

Value

Returns a plot of the accidents of state.num and year. Returns an error message if the no match for state or year is found in the data.

Examples

1
2
3
4
5
6
7
8
## Not run: 
fars_map_state(45, 2015)

# Results in an error
fars_map_state(45, 2016)
fars_map_state(60, 2015)

## End(Not run)

axelbudde/fars documentation built on May 5, 2019, 3:48 p.m.