fars_read_years: Return a list of tibbles from a list of specified years

Description Usage Arguments Value Note Examples

Description

This function takes a list of numeric values and returns a list of tibbles containing the MONTH and year columns only. The list of numeric values are translated to filenames via make_filename and the filenames are used to read in the corresponding csv files via fars_read. The tibbles returned by fars_read are reduced to the MONTH and year columns only.

Usage

1

Arguments

years

A list of numeric values matching the corresponding csv files to import

Value

This function has a side effect that returns a list of tibbles with two columns: year and MONTH

Note

If the argument of the years is not a list or if the list of tibbles cannot be executed, the function will return an error, specifying which year could not be returned.

Examples

1
2
3
## Not run: years <- list(2013, 2014, 2015)
fars_read_years(years = years)
## End(Not run)

HaydenMacDonald/farsr documentation built on May 27, 2019, 9:34 a.m.