Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function returns the total number of incidents per month in a given year. The only input is the
year the user wishes to evaluate, and the dplyr
package's bind_rows
, group_by
, and
summarize
functions and the tidyr
package's spread
function are all used to aggregate
the individual datapoints into a table of months and incidents per month
1 | fars_summarize_years(years)
|
years |
An integer representing a year that is 2013, 2014, or 2015 |
makes use of the fars_read_years
function, which uses the make_filename
and fars_read
functions, to first make a matrix of the same number of rows as the primary
datafile, then to add the relevant incident data to each row, and then finally to summarize each month
A table with the total number of incidents in each individual month of the given year
1 2 3 4 5 6 | ## Not run:
fars_summarize_years(2013)
fars_summarize_years(2014)
fars_summarize_years(2015)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.