fars_map_state: Print "fars_map_state"

Description Usage Arguments Details Value Note Examples

Description

This function plot a map where all accidents for the specified states (state.num) and the specified year are mapped, dependent on a csv file where these data are stored.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

a numeric vector, specifying the state which should be plotted.

year

a numeric vector of length one, specifying for which year the accidents should be plotted.

Details

This function incluede the read_csv, tbl_df, filter and map functions. Therefore the dplyr, maps and readr package has to be installed and loaded.

Value

This function has no return value. It generates a plot with all accidents of the corresponding year and state.

Note

If for the year no file exists an error occurs. If the state specifyed with state.num does not exist in the data an error occors. If no coordinates exists for any of the accidents an error occurs.

Examples

1
2
3
## Not run: fars_map_state(01 , 2013)
## Not run: fars_map_state(01 , 2014)
## Not run: fars_map_state(02 , 2014)

floasdf/finalAssignment documentation built on May 6, 2019, 4:59 p.m.