fars_map_state: fars_map_state Map State Motor Vehicle Fatalities.

Description Usage Arguments Details Value 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

is a numerical code for US state.

year

as an integer

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. An error message will be displayed if an invalid state number is chosen or the chosen year's data does not exist.

It require to load maps library (which will load also all the dependacies:mapproj, mapdata, sp, maptools,rnaturalearth) It require to load also the graphics library with it's dependacies

Value

plot of Selected US STATE with all the fatalities in the graphic window

Examples

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

## End(Not run)

kanga1988/kangakola_coursera_R_pkg documentation built on May 28, 2019, 2:48 p.m.