fars_summarize_years: Summarize FARS data across years

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function creates a summary table of the counts of observations by month across the specified years.

This function will return a warning if the data for a specified year cannot be found.

Note: This function requires magrittr is already loaded or it will return an error.

Usage

1

Arguments

years

A vector or list of integers or characters of years for which to summarize the data

Value

This function returns a tibble with one row for each month and a column for the month number followed by one column per specified year. These columns contain the observation counts for the relevant month and year.

Examples

1
2
3
4
5
6
7
8
## Not run: 
fars_summarize_years(2013)   
fars_summarize_years(c(2013, 2014))
fars_summarize_years(2013:2015)
fars_summarize_years(c("2013", "2015"))
fars_summarize_years(list(2013, 2014))

## End(Not run)

willrussifp/RPackageCoursera documentation built on May 19, 2019, 4:06 p.m.