fars_map_state: Return a map plot of incidents.

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This is a function that takes a state number and year in the form of an integer or string as an argument and then uses that value to generate a map plot of observations for that state. and year.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numeric or string that corresponds to a given state in the data set.

year

A year passed as an argument in the form of an integer or string for which the data should be read in.

Details

This function will return an error message for invalid years, invalid state numbers, and if there are no accidents to plot

Value

This function returns a plot of observations in the selected state will NULL class

Examples

1
2
3
4
5
## Not run: 
fars_map_state(20, 2013)
fars_map_state('20','2013')

## End(Not run)

mikemcclendon/farsfunctions documentation built on May 5, 2019, 5:53 p.m.