fars_summarize_years: Summarize the number of accidents per month in a table of...

Description Usage Arguments Value Examples

Description

This function first calls the fars_read_years function to read in data from accident records for a given set of years. It then compiles all of the data frame tbls it's read in into a single data frame table by binding all the rows. It then creates a a summary count of accidents per month, per year, and spreads the data frame tbl into a data frame in the form of a table of months vs years.

Usage

1

Arguments

years

the years to find files for to load data into R. can be a vector or a single year

Value

a data frame of accident counts by month, spread according to the years factor

Examples

1
2
3
4
5
## Not run: 
fars_summarize_years(years=c(2013,2014,2015))
fars_summarize_years(c(2013,2014,2015))

## End(Not run)

schwarja209/rfars documentation built on May 29, 2019, 9:32 a.m.