fars_summarize_years: Creates a summary table with the counts of car fatalities.

Description Usage Arguments Value Warning Examples

View source: R/fars_functions.R

Description

It creates a summary table with the tallies of the car fatalities reported by the US National Highway Traffic Safety Administration in the Fatality Analysis Reporting System for a specific period.

Usage

1

Arguments

years

A numeric vector representing the years of a time period.

Value

A tibble object with the tallies of car fatalities by month for each year in the specified period.

Warning

Provided that a file does not exist for a specific year, the function will throw a warning that the information does not exist.

Examples

1
2
3
4
5
6
7
8
# We set the working directory where the compressed files are stored within
# the package.
WD <- setwd(system.file("extdata", package = "rfars"))
# Summary with the tallies of car fatalities in 2013.
fars_summarize_years(2013)
# Summary with the tallies of car fatalities in 2013 and 2014.
fars_summarize_years(c(2013, 2014))
setwd(WD)

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