fars_read_years: Read in one or more years of FARS data.

Description Usage Arguments Value Examples

Description

Reads in Fatality Analysis Reporting System data for one or more years.

Usage

1
fars_read_years(years, path = "inst/extdata")

Arguments

years

A year or vector of four-digit years for which you want to read in FARS data.

path

The path to the FARS data file to read. The default is the path to the three supplied raw data files.

Value

A table or list of tables of FARS data.

Examples

1
2
3
4
## Not run: fars_read_years(years = 2014)   # Returns FARS data for the year 2014.
years <- c(2013, 2014, 2015)
## Not run: fars_read_years(years = years) # Returns a list of three tables of FARS data.
## Not run: fars_read_years(years = 14)    # Results in an invalid year error.

Alice-MacQueen/farsr documentation built on May 13, 2019, 11:22 a.m.