Description Usage Arguments Details Value References Examples
A function to extraxct monthly data from a given set of years.
fars_read_years
This function uses an user provided series of years to
extract their FARS monthly data
1 | fars_read_years(years)
|
years |
Is a numeric vector corresponding to the series of years for which you want to extract monthly data. |
For each year provided in the numeric vector argument to the function, the make_filename function from this package generates its corresponding filename. The data from each file will then be extracted using the fars_read function from this package. Subsequently, the monthly data is subsetted by means of the dplyr functions mutate and select. The functions evaluates the code and assigns a warning handler to years for which data are not available.
A list of subsetted dataframes in dplyr format with the monthly data from every year included in years.
https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars
1 2 3 4 5 6 | fars_read_years(c(2013,2014,2015))
## Not run:
fars_read_years(c(2016,2017))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.