Description Usage Arguments Value Source See Also Examples
View source: R/fars_functions.R
This function will search and read the FARS files in the current directory with the given years, then return dataframe with the given years and month of the fatal injuries incidents (long format, each year is a seperate dataframe), or NULL if the file not exist.
1 | fars_read_years(years)
|
years |
a vector with list of years. |
If the given year exist, return a dataframe with the given year and month of the fatal injuries incidents (long format); if the file does not exist, return NULL with warning message "invalid year: ..."
Data source: US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS), which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.
1 2 | ## Not run: fars_read_years(2013)
## Not run: fars_read_years(c(2013, 2014))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.