fars_summarize_years: Summarise the data for the list of years

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function create a summary for some years from the input files. The function uses fars_read_years() to collect the data. The summarized data is a non-tidy table of the number of accidents for a give month and year.

Usage

1

Arguments

years

List or vector of the years to be extracted from the datafile.

Value

This function returns a data frame. The data frame has 12 rows, each month has a row. The data frame has one column for the month plus each year from the years argument has its own column. specific element in a row for a given year contains the number of accidents from the sample data.

Examples

1
2
3
4
## Not run: 
fars_summarize_years(years=c(2014,2015))

## End(Not run)

cogitoergoread/fars documentation built on Jan. 25, 2020, 1:12 p.m.