fars_map_state: Plots the locations of accidents on a map

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

The function takes a state number and year as input and plots the locations of the accidents on a map. An invalid state number or year results in an error.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The number of a state in the US as per the FARS data sets. Coerced to integer

year

The year for which data is to be plotted. Coerced to integer

Value

A plot of the accidents for the state.num and year provided. Returns NULL for invalid input

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
fars_map_state(44, 2010)
fars_map_state("15", 2010)

# Error
fars_map_state(45, 2030)
fars_map_state(-1, 2010)

## End(Not run)

faizan-khan-iit/fars documentation built on May 13, 2017, 10:09 p.m.