fars_map_state: Plot locations of highway traffic fatalities on a given state...

Description Usage Arguments Value Note Examples

View source: R/fars_functions.R

Description

This function draws a wireframe map of a given state and year from US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS) data for given years. See fars_read_years. State numbering is used.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

integer number of a state

year

integer, the year

Value

NULL, draws a map into dev

Note

Only one state and year work, providing leads to errors. Missing FARS data for the given year causes an error. The files are expected to be in the same directoty where the function is run. See fars_read_years for FARS data details and file requirements.

Examples

1
## Not run: fars_map_state(1, 2013)

jhimberg/r_packages_excercise documentation built on April 9, 2020, 11:10 p.m.