Description Usage Arguments Value References See Also Examples
View source: R/fars_functions.R
fars_summarize_years
lists the number of fatal
injuries suffered in motor vehicle accidents in each month
for a specified list of years. The data is compiled by the
Fatality Analysis Reporting System (FARS) of the US National
Highway Traffic Safety Administration.
1 | fars_summarize_years(years, dir = "./inst/extdata")
|
years |
a list of years (each represented as 4-digit integers or character strings) for which data is desired |
dir |
a character string containing the directory that contains the FARS data |
The function returns a tibble data frame (class tbl_df, as defined by the dplyr package) with twelve rows, each corresponding to a month of the year. Columns correspond to different years and data values represent the number of fatalities for each year and month.
https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars
1 2 3 4 | dir <- system.file("extdata",package="msdr3pam")
fars_summarize_years(c(2013,2014,2015),dir=dir)
fars_summarize_years(c('2013','2015'),dir=dir)
fars_summarize_years(list('2014','2015'),dir=dir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.