fars_map_state: Map with accident locations

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function creates a map of the accident locations for a given state and year. Returns an error message of Invalid year: <value> if the year value is not between 2013-2015. Returns an error message of Invalid STATE number: if the state number is not one of the States included in the data. Returns an error of no accidents to plot if there are no accidents for the specified state number and year.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

Integer value between 0 and 50.

year

The year

Value

a map object. Prints the map as a side-effect.

Examples

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

## End(Not run)

rparrish/FARSmap documentation built on May 28, 2019, 12:35 a.m.