Description Usage Arguments Details Value Examples
View source: R/fars_functions.r
This is a readr_csv
function that reads a FARS data file given a relevaant year(s).
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.
Otherwise, the function constructs a vecotr of file names using make_filename
and reads them in a list using fars_read
.
A list
of data.frame
s, each of its elements correspond to one of the given years.
1 2 3 4 5 6 7 8 | ## Not run:
# invalid input, year does not exist
fars_read_years(c(2013, 2014, 3000))
# valid input, years exist
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.