Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function counts the number of traffic fatalities per month/year for the
vector of years specified in argument years
.
1 | fars_summarize_years(years)
|
years |
A vector of years for the files you're interested in. |
This function makes use of the fars_read_years()
function, which in
turn makes use of fars_read()
which uses make_filename()
. First,
the list of tibbles returned by fars_read_years()
is unioned and then
grouped by year and month. Then dplyr::summarize()
is used to count
the number of fatalities in each year/month group. Finally, tidyr::spread
pivots the counts so that they're visually appealing for printing.
This function returns a tibble.
1 | fars_summarize_years(c(2013, 2014, 2015))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.