fars_summarize_years: Count accidents by months, filtered by a set of years.

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function counts accidents grouped by months and filtered by years

Usage

1

Arguments

years

A vector of integers representing a series of years

Details

Returns an error if none of the elements in years is valid. If only some of the elements are invalid returns the tibble and throws warnings for every invalid year.

Value

Returns a tibble consisting of MONTH and the count of records for every year in the years.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Filtering by existing years
fars_summarize_years(2013)
fars_summarize_years(2013:2015)

# Filtering by partially existing years
fars_summarize_years(2010:2013)
fars_summarize_years(2013:2017)

# Filtering by non-existing years
fars_summarize_years(2010)
fars_summarize_years(2016:2018)

## End(Not run)

Davidovich4/building.an.R.package documentation built on May 29, 2019, 2:08 p.m.