fars_summarize_years: Summarize the content of multiple FARS data files

Description Usage Arguments Details Value Examples

Description

This function produces a summary data.frame containing the number of reports by month for the FARS files corresponding to each year in the years list.

Usage

1

Arguments

years

A list of 4-digit year numbers (YYYY) specifying the FARS files to be read.

Details

Missing years will be skipped with a warning.

The following functions are imported: dplr::bind_rows, dplr::group_by, dply::summarize, and tidyr::spread

Value

This function returns a data.frame of 12 observations, one each month, of the number FARS reports in the specified years.

Examples

1
2
3
4
5
fars_summarize_years(list(2013, 2014, 2015))
# will produce a warning
#fars_summarize_years(list(2013,2016))
# will fail
#not run, will fail: fars_summarize_years(1999)

dmendres/farsAssignment documentation built on May 15, 2019, 9:20 a.m.