fars_map_state: fars_map_state

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

returns a plot of the fatalities in a particular state in particular year

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

state number that corresponds to a state in the FARS dataset

year

the year in question

Details

The function plots a data point for each fatality in the dataset for the particular state

The LONGITUDE and LATITUDE values are cleaned up before being passed to the map routine with invalid entires being marked as NA. The map routine then removes NA values

The function will return an error if the state.num is not in the dataset It will also return a message if there are no value

Value

a plot of the fatalities in a particular state in particular year

Examples

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

## End(Not run)

danlanguedoc/farsdata documentation built on May 17, 2019, 4 p.m.