fars_summarize_years: Count Incidents per Month per Year

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

fars_summarize_years(years) takes the year or years in as a parameter and creates a dplyr style table (tibble) that counts the number of incidents per month for the given year. This function uses fars_read_years function as well as group_by and summarize functions from *dplyr* package. Additionally, function requires tidyr pacakge to utilize spread function.

Usage

1

Arguments

years

Numerical values which can be a single year or multiple years. Error will result if no-numeric value is passed into the function.

Value

function will return the number of incidents per month for the given year(s).

Examples

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

MoRudyKim/farsfunc documentation built on May 28, 2019, 1:54 p.m.