fars_read_years: Load data from accident files given a list of years

Description Usage Arguments Details Value Examples

Description

This is a function that loads data from highway accident files with names in a specific format and returns a data_tbl with the month and year of each accident.

Usage

1

Arguments

years

A vector of strings or integers giving the years to retrieve

Details

The highway accident files for the years given in years must be in the current working directory or an error is thrown.

Value

a list of data_tbl with columns named MONTH and year and a row for each accident.

Examples

1
2
3
4
5
6
## Not run: 
fars_read_years(c(1984,1986,1988))
fars_read_years(1984:1988)
fars_read_years(c("1984","1986","1988"))

## End(Not run)

tcoopermont/fars documentation built on May 31, 2019, 7:29 a.m.