fars_summarize_years: 'fars_summarize_years' - Creates a summary of all fatalities...

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

fars_summarize_years - Creates a summary of all fatalities by year, for each year input by the user.

Usage

1

Arguments

years

A list or vector of years over which the summary is calculated.

Details

This function relies on the fars_read_years function to extract the variables from the file associated with each year. It stacks these datasets together vertically, then groups by year and calculates summaries, returning the result.

Value

Returns a dataframe with the summaries of each year as separate columns.

Examples

1
2
3
4
5
## Not run: 
fars_summarize_years(c("2013","2015"))
summ_data <- fars_summarize_years(list(2014,2015,2016))

## End(Not run)

12mre1/fars documentation built on Oct. 30, 2019, 4:02 a.m.