This function is for reading FARS data of multiple years. You
can provide a vector of years which will be converted to appropriate
file name using make_filename. After that, function will attempted to read
each file name. If filename does not exist, warning will be shown and
will be returned for that years data.
a vector of years (will be coerced to integer)
a function to be applied to filename that
If data for a year does not exist, returning list will have
NULL value associated with it
list of dataframes containing data for each year. names of the list will be years and their corresponding values will have data for that year.
1 2 3 4
## Not run: 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.