Description Usage Arguments Details Value Depends on Examples
View source: R/fars_functions.R
Summarizes the number of fatal injuries suffered in motor vehicle traffic crashes by month for each provided year.
1 | fars_summarize_years(years)
|
years |
A vector containing the years of interests as |
This function performs the steps below:
Read the FARS data files in R as a data frame tables for
provided years (using fars_read_years
).
Bind all of the data frame tables by row into one data frame table (see bind_cols
).
Summarize the number of incidents by year
and MONTH
.
A data frame table (see tbl_df
in the dplyr
package).
bind_rows
, group_by
and summarize
in the
dplyr
package.
spread
in the tidyr
package.
1 2 3 4 5 | ## Not run:
fars_summarize_years(c(2013, 2014))
fars_summarize_years(c("2013", "2014"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.