fars_summarize_years: Count the number of accidents per month and year

Description Usage Arguments Value Examples

Description

This function load data from data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, binds the yearly data together, group by year and month, counts th number of accidents and spread the results with month in rows and a year per column.

Usage

1

Arguments

years

An character vector, integers or a list containing years

Value

a spread data frame and returns NULL if the years can not be found in the files in the directory or if the directory is not properly set

Examples

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

## End(Not run)

ivalette/faRs documentation built on May 18, 2019, 7:12 a.m.