fars_read_years: Load and tidy all accident data for given years

Description Usage Arguments Value Examples

Description

For each year input, this function first calls the make_filename function to generate the files name for the data on accidents in that year, then loads the generated filename into R using the fars_read function, and finally reduces the data to just month and years columns. If a file with a given year does not exist, it will return an error.

Usage

1

Arguments

years

the years to find files for to load data into R. can be a vector or a single year

Value

a list of data frame tbls, for given years, each with month and year columns, or an error, if a file for the given year does not exist.

Examples

1
2
3
4
5
## Not run: 
fars_read_years(years=c(2013,2014,2015))
fars_read_years(c(2013,2014,2015))

## End(Not run)

schwarja209/rfars documentation built on May 29, 2019, 9:32 a.m.