fars_summarize_years: Summarize FARS data by year

Description Usage Arguments Value Source Examples

View source: R/fars_functions.R

Description

This function will summarize the number of injuries counts per month for the given years, or return warning if the data with given year does not exist.

Usage

1

Arguments

years

a vector with list of years.

Value

A summarize table with the given year and number of injuries counts per month (in wide format); if the data with given year does not exist, return NULL with warning message "invalid year: (given_year)".

Source

Data source: US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS), which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.

Examples

1
2
## Not run: fars_summarize_years(2013),
## Not run: fars_summarize_years(c(2013, 2014))

mandyhee/farspkg documentation built on June 12, 2020, 6:03 p.m.