fars_read_years: Read Data For a List of Years

Description Usage Arguments Details Note Examples

Description

This function takes a vector of years, finds the corresponding data file for each year, reads it, and returns a data frame for each year with 'MONTH' and 'year' columns.

Usage

1

Arguments

years

A vector of the years for which we want to get data.

Details

The function first calls make_filename() to create a filename for a year in the list, and then passes that filename to fars_read() to read data from the file into a data frame. The year is added as a column in the data frame. Finally, the MONTH and year are selected.

Note

Will give a warning for any year in the list that does not have a matching data file.

Examples

1
fars_read_years(c('2013', '2014', '2015'))

MaryLvV/mvfars documentation built on May 7, 2019, 3:40 p.m.