fars_read_years: Reads month and year from accident files

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function returns a list of data frames with MONTH and year columns based on data in "accident_<year>.csv.bz2 files. The files need to be located in the working directory.

Usage

1

Arguments

years

A vector or list of years in numeric or integer format.

Value

a list of tibbles with the same number of rows as the data in "accident_<year>.csv.bz2" files and two columns - MONTH and year. NULL value if year is invalid (also a warning will be raised).

Examples

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

# Results in a warning
fars_read_years(2016)

## End(Not run)

ThoDuyNguyen/fars documentation built on May 20, 2019, 3:34 p.m.