fars_summarize_years: Import all files

Description Usage Arguments Details Value Examples

Description

This function takes a vector of years (years) to create an R tibble dataframe consisting of the respective files combined (for each year passed in years). It then combines together these dataframes into one (using function (fars_read_years)) to perform aggregations on volumen of accidents per year/month.

Usage

1

Arguments

years

A character vector of years.

Details

The function uses fars_read_years function (fars_read_years) to execute the described process.

This function uses dplyr and tidyr packages form tidyverse package repository.

Value

A R tibble (wide format) dataframe with 'Years' on the rows and 'Months' as columns with the volume of accidents as values.

Examples

1
2
3
4
5
## Not run: 
years <- c("2013","2014","2015")
fars_summarize_years(years)

## End(Not run)

joaocunha1991/AccidentR documentation built on May 27, 2019, 7:45 a.m.