Description Usage Arguments Details Note Examples
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.
1 | fars_read_years(years)
|
years |
A vector of the years for which we want to get data. |
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.
Will give a warning for any year in the list that does not have a matching data file.
1 | fars_read_years(c('2013', '2014', '2015'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.