fars_read_years: Read multiple years of FARS data

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function returns a tibble of tidy data (one row per observation) with the month and year of the observation.

Usage

1

Arguments

years

A vector or list of integers or characters of years for which to return the data

Details

This function will return a warning if the data for a specified year cannot be found.

Note: This function requires magrittr or tidyr is already loaded or it will return an error.

Value

This function returns a list of tibbles, one per specified year, with one row per observation. The columns return are MONTH and year.

Examples

1
2
3
4
5
6
7
8
## Not run: 
fars_read_years(2013)
fars_read_years(c(2013, 2014))
fars_read_years(2013:2015)
fars_read_years(c("2013", "2015"))
fars_read_years(list(2013, 2014))

## End(Not run)

willrussifp/RPackageCoursera documentation built on May 19, 2019, 4:06 p.m.