fars_map_state: Produce a plot of the location of the accidents on a state...

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function returns the location of the accidents for a specified state and year.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The state number, numeric integer value.

year

A year, numeric value in the form yyyy of the accidents.

Value

This function returns a plot of a state map with points representing the location of the accidents in the year. If the state is not a valid number or it is not found in the data then the function stops and returns an error with the message "invalid STATE number: ". If there is no accident for the specified state and year then the function returns the message "no accidents to plot".

Examples

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

## End(Not run)

llangevin/FARS documentation built on May 21, 2019, 7:33 a.m.