fars_summarize_years: fars_summarize_years

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

takes a list of years and reads them in using fars_read_years it then binds these dataframe together and summarizes the data.

Usage

1

Arguments

years

A vector or list of years (numeric or integer) to read in and summarize

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 summarized data which is converted to a wide format

Examples

1
2
3
4
5
## Not run: 
 fars_summarize_years("2015")
 fars_summarize_years(c(2013.0,2014))
 
## End(Not run)

smallikarjun/MyfarsPkg documentation built on May 23, 2019, 2:01 a.m.