fars_summarize_years: Number of accidents per months/year(s)

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function returns a summary of the number of accidents by month and for each specified year.

Usage

1

Arguments

years

One or more years, numeric integer value specified in form of a list.

Value

This function returns a summary of the number of accidents by month and for each specified year. It will return a tibble object that have all these classes: 'tbl_df', 'tbl' and 'data.frame'. One row for each month, the month number in the first column (MONTH) and for each specified year a column with named from the year ('yyyy') containing for each month the number of accidents. If one or more specified years is not valid, the function return an error and specify the invalid year.

Examples

1
2
3
4
## Not run: 
summarize_years<-fars_summarize_years(years=2013:2015)

## End(Not run)

llangevin/FARS documentation built on May 21, 2019, 7:33 a.m.