fars_summarize_years: Returns monthly number of accidents by year

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

Returns monthly number of accidents by year

Usage

1

Arguments

years

list of years

Details

This function takes in a list of years and returns a data frame containing the monthly number of accidents for each year. The first column of the data frame contains the month, with subsequent columns each corresponding to a year and each row the number of accidents that occurred in that month for that year.

This function requires dplyr and tidyr.

Value

data frame whose first column is the month and whose subsequent columns contain monthy accident counts for each year passed to the function

Examples

1
2
3
4
## Not run: 
annual_summary <- fars_summarize_years(list(2013, 2014))

## End(Not run)

csprock/myRpackage documentation built on Nov. 30, 2021, 8:03 a.m.