fars_map_state: Plots the car fatalities in a US state and in a specific...

Description Usage Arguments Warning Examples

View source: R/fars_functions.R

Description

It plots, in a map, the car fatalities occurred in a given US state and in a specific year using the data reported by the US National Highway Traffic Safety Administration in the Fatality Analysis Reporting System.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

An integer value corresponding to a US state.

year

A numeric vector representing the years in a time period.

Warning

If the state.num parameter is not a valid state number or the information specified in the year parameter does not exist, the function will throw an error.

Examples

1
2
3
4
5
# We set the working directory where the compressed files are stored within
# the package.
WD <- setwd(system.file("extdata", package = "rfars"))
fars_map_state(12, 2015)
setwd(WD)

Cesar-Urteaga/rfars documentation built on May 27, 2019, 7:28 a.m.