fars_summarize_years: Summarize grouped accident data

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function takes a numeric vector of four-digit name of years and creates a single tibble containing data from various years.

Usage

1

Arguments

years

a numeric vector containing four-digit numeric values.

Details

This function takes a numeric vector of four-digit name of years. It calls to fars_read_years to create a list of tibbles containing data for the corresponding years. After that it calls to bind_rows to attach row-wise the elements of the list in order to create one single tibble. It subsequently groups the data base on year and month and summarizes the number of fatalities in every month per year.

Value

A tibble

Examples

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

## End(Not run)

AnoushiravanR/fars documentation built on Jan. 19, 2021, 5:16 p.m.