Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This is a function that takes a set of years and, for each year, returns a tibble showing the total number of accidents recorded in each month of that year.
1 | fars_summarize_years(years)
|
years |
The list or vector of four-digit years for which you want to import information. |
For this function to work properly, a year must be provided that corresponds to a year of data in a properly-named spreadsheet in the working directory. If the year is not valid or the spreadsheet is not in the directory, the function will return an error.
This function returns a tibble with 12 rows - one corresponding to each month of the year - and one column, titled by the four-digit year, for each valid year provided in the argument plus an additional column MONTH listing the months in the data from 1-12.
Each column named with a year shows the total month-by-month accident reports for each month of that year.
1 2 3 4 5 6 | ## Not run:
fars_summarize_years(c(2013, 2014, 2015))
fars_summarize_years(2014)
fars_summarize_years(2010)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.