fars_summarize_years: Returns ordered and summarized version of datasets

Description Usage Arguments Value Examples

Description

This function builds on the functionality of fars_read_years to read the data from multiple CSV files containing the data for the years corresponding to the input years. The dplyr and tidyr functions bind_rows, group_by, group_by and spread are used to tidy the data and only return the 'MONTH' and 'year' variable columns respectively, while ensuring that the 'MONTH' column is not duplicated when multiple years are used as inputs.

Usage

1

Arguments

years

A vector of numbers or character strings representing years.

Value

This function returns a tibble summarizing the data found for each input year requested. A warning is returned for each input year not corresponding to a valid dataset, while not affecting the output for valid years.

Examples

1
2
3
4
5
6
## Not run: 
fars_summarize_years(2013)
fars_sumarize_years(c("2013","2014"))
data <- fars_summarize_years(2013)

## End(Not run)

supervan2/Testy documentation built on May 17, 2019, 2:47 p.m.