Description Usage Arguments Details Value Examples
This is a custom readr_csv function that reads a FARS data file given their corresponding years.
1 | fars_read_years(years)
|
years |
A vector of |
The function returns a warning invalid year: year if the input year does not correspond to one of the files in the current working directory.
othewise construct a vecotr of file names using make_filename and reads them in a list using fars_read.
A list of data.frames, each of its elements correspond to one of the inpute years.
1 2 3 4 5 6 7 8 | ## Not run:
# invalid input, year doesn't exist
fars_read_years(c(2013, 2014, 1900))
# valid input
fars_read_years(2013:2015)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.