fars_summarize_years: Calculate a number of accidents per month and year

Description Usage Arguments Value Note Examples

Description

This function accepts a vector or list of years years, where the records from US National Highway Traffic Safety Administration's Fatality Analysis Reporting System should be available. It calculates a number of accidents per month and year and returns a tibble (data.frame) with months in rows and years in columns.

Usage

1

Arguments

years

A vector or list (numeric or integer) with the years of accident records.

Value

This function returns a tibble (data.frame) with number of accidents per month and year from the indicated years of records.

Note

This function will give error if the files are not located in the working directory or if the input year is non-numeric or non-integer.

Examples

1
2
3
4
5
## Not run: 
fars_summarize_years(2013)
fars_summarize_years(2013:2015)

## End(Not run)

andangshide/farsfunctions documentation built on May 12, 2019, 2:40 a.m.