fars_map_state: Plotting the observations

Description Usage Arguments Value Examples

Description

The "fars_map_state" function plots the observations of fatal accidents on the map of the provided state in the year defined by the user.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

An integer representing a state in the USA.

year

An integer meaning the year of observation.

Value

The function plots the map of the american state chosen by the user. Black dots represent the place of observed fatal accidents. If user define an invalid state number or year for which data are not available, the function returns an error. If in a given state/ year pair there are no observed accidents, the function returns the message "no accidents to plot".

Examples

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

## End(Not run)

ortzsu/farspractise documentation built on May 24, 2019, 3:58 p.m.