fars_summarize_years: Produce a Summary of FARS Files.

Description Usage Arguments Details Value Examples

Description

fars_summarize_years produces a summary tibble of FARS years and months given a vector of years.

Usage

1

Arguments

years

Vector of years' FARS files to open. Vector members must be an integer, or a string or numeric that can be coerced to a string.

Details

This function takes a vector of years, pulls the FARS data for those years, and then produces a summary tibble. The summary tibble shows the number of observations for each month/year combination for the extracted FARS data. For this function to work properly, the years must be years with valid data.

Value

This function returns tibble where the first column is the month, the second and following columns are the requested years, and the rows for the year columns are the number of FARS observations for that month/year combination. The returned columns are only for years with valid FARS data. If no valid years are found, the function well error out.

Examples

1
2
3
4
5
6
7
fars_summarize_years(years = c(2013, 2014, 2015))
fars_summarize_years(years = 2013)

## Not run: 
fars_summarize_years(years = 2000)

## End(Not run)

Kazim1212/fars_packagebuild documentation built on May 5, 2019, 1:33 a.m.