fars_map_state: Plot State from Fatality Analysis Reporting System Dataset

Description Usage Arguments Value Examples

View source: R/functions.R

Description

This function helps to read dataset in working directory and plot the state according to state number. It aimed to plot using datasets from US National Highway Traffic Safety Administration's Fatality Analysis Reporting System.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A number representing state number.

year

A number for which year's datasets should be readed

Value

This function returns a plot of state from loaded dataset. If input 'state.num' is not avaliable in the dataset it will throw an error looking like ""invalid STATE number: ", 'state.num'. If the 'year' input is not an integer or a class can not coerced to integer then it would not read the appropriarte file and would give an error.

Examples

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

## End(Not run)

badalovi/pfars2 documentation built on April 24, 2020, 9:44 p.m.