fars_map_state: fars_map_state

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function takes a state number and set of years as input and shows an overview of fatalities on a map in that particular time period.

Uses function make_filename and fars_read from the current package. Removes coordinate outliers - longitude values greater than 900 and latitude values greater than 90 are removed.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The number of a state in the US as used in the FARS dataset Should be numeric or integer.

year

The year of analysis (numeric or integer)

Value

a graphical overview of fatalities on a map in a particular time period. Returns an error if the state or year do not exist in the data set.

Examples

1
2
3
4
5
6
7
8
## Not run: 
fars_map_state(45, 2015)

# Results in an error
fars_map_state(45, 2016)
fars_map_state(60, 2015)

## End(Not run)

smallikarjun/MyfarsPkg documentation built on May 23, 2019, 2:01 a.m.