Description Usage Arguments Details Value Note Examples
This is a function summarizes the number of accidents for every month of all selected years (using the years
argument) and returns tibble with the columns MONTH and for every year in years
a column with the number of accidents.
1 | fars_summarize_years(years)
|
years |
a numeric vector, representing the years for which the accident_data should be summarized. fars_summarize_years |
This function is a wrapper for the fars_read_years function. The external functions mutate
, select
, group_by
, bind_rows
,
summarize
, spread
tbl_df
and read_csv
are included.
Therefore the dplyr , tidyr and readr package has to be installed and loaded.
This function returns a tibble which contains in the first collumn the month and in the following columns for every year in years
the number of accidents. for all the years specified in the years
argument. Every entry of the list is a data.frame with the columns year and MONTH.
If for an element of the years
argument no corresponding file is found a warning occurs.
1 2 | ## Not run: fars_summarize_years(2013)
## Not run: fars_summarize_years(c(2013,2014))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.