fars_summarize_years: Summarse data by year

Description Usage Arguments Details Value Note Examples

Description

fars_summarize_years takes a list of years and reads them in using the fars_read_years it then binds these dataframes together and summarises the data.

Usage

1

Arguments

years

The years to read in and summarise

Details

The function will take in a vector of years and read in the data using the fars_summarize_years function, it then binds these rows together and groups by the year and MONTH column creating a count column: n. The data is then converted from a long format to a wide format using the spread function in tidyr.

Value

a data.frame of summarised data which is converted to a wide format

Note

This functions depends on the bind_rows, group_by, summarize functions from dplyr and spread from tidyr

Examples

1
2
3
4
## Not run: 
  fars_summarize_years(c(2013, 2014))

## End(Not run)

ZeroStack/week2 documentation built on May 10, 2019, 1:57 a.m.