fars_map_state: FARS map states.

Description Usage Arguments Value Depends on Examples

Description

Draws the location of accidents in a US State for a given year

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

An integer that represents the state number.

year

a vector of integer or strings that indicated the year of interest.

Value

This function draws a map of the State and shows one point for each fatality that occurred in that State. Will throw an error if an invalid state number is chosen or the chosen year's data does not exist.

Depends on

  1. filter in the dplyr package.

  2. map in the maps package.

  3. points in the graphics package.

Examples

1
2
3
4
5
## Not run: 
fars_map_state(3, 2014)
fars_map_state("3", "2014")

## End(Not run)

CarlosSilva34/fars documentation built on May 23, 2019, 11:36 p.m.