fars_read_years: Read FARS data files of given years

Description Usage Arguments Value Note Examples

Description

This function returns a list of data files per year, as specified by the parameter years. The parameter is used to create filenames, using the make_filename helper function. If an invalid year is passed, the return value for that year is NULL

Usage

1

Arguments

years

A numeric vector containing the years of which the FARS data is asked

Value

A list of data.frames or NULL if the year resulted in an invalid file

Note

if any of the numbers in years is not valid, the list will contain "NULL" at that index, and a "invalid year" warning will be issued. Much of the detail in the data available in the FARS dataset is ignored, as only MONTH and year are selected.

Examples

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

RMHoek/farsfunctions documentation built on May 22, 2019, 12:41 p.m.