fars_map_state: Map State Motor Vehicle Fatalities.

Description Usage Arguments Details Examples

Description

fars_map_state maps state motor vehicle fatalities given a year and state id number.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

Numerical code for US state.

year

An integer, or a string or numeric that can be coerced to a string, of the year of interest.

Details

This function takes a state number and a year, and draws a state outline with dots to represent the location of motor vehicle fatalities for that year. This function will throw an error if an invalid state number is chosen or the chosen year's data does not exist.

You must have library(mapdata) loaded in your namespace for this to work.

Examples

1
2
3
4
5
6
7
8
library(mapdata)
fars_map_state(12, 2014)
fars_map_state(36, 2014)

## Not run: 
fars_map_state(3, 2014)   # error

## End(Not run)

takashisendo/far documentation built on May 5, 2019, 12:33 p.m.