fars_map_state: Map FARS data by state

Description Usage Arguments Details Value Depends on Examples

View source: R/fars_functions.R

Description

This is a function that reads FARS data for specified year and then plots it on a contour map of the state specified by state.num

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

numeric number from 1 to 56 that specifies the state to plot on the map

year

numeric number that specifies the year to read the data for

Details

Map of the state with dots of casualities will be ploted

Value

This function returns a plot

Depends on

  1. filter in the dplyr package.

  2. map in the maps package.

  3. points in the graphics package.

Examples

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

## End(Not run)

zpopovych/fars documentation built on May 20, 2019, 1:24 p.m.