fars_map_state: fars_map_state

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function creates plots of all the accidents in a given state, year combination. This function imports filter from the dplyr package, map from the maps package and points from the graphics package. An error will be thrown if the state.num input is not in the STATE column of the dataset. It will alsow throw an error if there are no accidents recorded in the data frame for the given year and state.num combination.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A character or integer vector of the state number.

year

A character or integer vector of the years a user wants to read in.

Value

Plot of accidents for a given year and state.

Examples

1
fars_map_state_years(49, c(2000,2001,2002))

adanvr/fars documentation built on May 26, 2019, 4:38 p.m.