fars_map_state: Plot the accidents on a map

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function plots the accident data for the specified state in the specified year.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The number of a US state coerced to integer.

year

An integer representing the year in the FARS dataset. Non-integers are coerced to integer.

Details

Returns an error if there is no data for the specified state and year.

Value

This function returns a plot of the accidents in a state map.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Existing state, year pair
fars_map_state(1, 2013)

# Non-existing state or year
fars_map_state(1, 2016)
fars_map_state(100, 2013)

## End(Not run)

Davidovich4/building.an.R.package documentation built on May 29, 2019, 2:08 p.m.