Description Usage Arguments Value Warning Examples
View source: R/fars_functions.R
It creates a summary table with the tallies of the car fatalities reported by the US National Highway Traffic Safety Administration in the Fatality Analysis Reporting System for a specific period.
1 | fars_summarize_years(years)
|
years |
A numeric vector representing the years of a time period. |
A tibble object with the tallies of car fatalities by month for each year in the specified period.
Provided that a file does not exist for a specific year, the function will throw a warning that the information does not exist.
1 2 3 4 5 6 7 8 | # We set the working directory where the compressed files are stored within
# the package.
WD <- setwd(system.file("extdata", package = "rfars"))
# Summary with the tallies of car fatalities in 2013.
fars_summarize_years(2013)
# Summary with the tallies of car fatalities in 2013 and 2014.
fars_summarize_years(c(2013, 2014))
setwd(WD)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.