fars_summarize_years: Counts number of accidents per month and year

Description Usage Arguments Value Examples

Description

Based on the list of years, the function calculates the number of accidents in the US on a monthly basis. The accident files need to be in the working directory, the years can be passed as a list or a vector.

Usage

1

Arguments

years

A vector or list of years (numeric or integer) that will be searched in the data

Value

Returns a pivot tibble (data frame) with months in rows and selected years in columns containing the number of accidents. Returns a warning for every input year that does not exist in the datasets. Returns an error (no results) if a different than numeric or integer input is presented.

Examples

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

## End(Not run)

SimonFans/RP documentation built on May 8, 2019, 11:10 p.m.