Description Usage Arguments Value Note Examples
This function constructs a list of tibbles containing the month and year variables for each year
(one list element per year) for a set of years (e.g. 2013:2015
).
1 | fars_read_years(years)
|
years |
A vector of year values in %Y format, e.g., |
A list containing the month an year variable for each of the years of the Traffic Safety Administration's Fatality Analysis Reporting System datasets
The data for each year should be in format "accident_<year>.csv.bz2". If a file for a given year
is not found a warning is printed out and the list element for that year is NULL
. This function
uses make_filename
to construct the filename to the dataset and fars_read
to load the dataset as a tibble.
1 2 | fars_read_years(2015)
if (any(file.exists(make_filename(2013:2015)))) {fars_read_years(2013:2015)}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.