fars_summarize_years: Summarizes the FARS data by year and month.

Description Usage Arguments Value Examples

View source: R/fars.R

Description

The fars_summarize_years function summarizes the number of accidents for each year by month. The first column represents MONTH and the other column are the input years. If the input year is not present in the data it returns an error.

Usage

1

Arguments

years

Integer of years or acharacter coreciable to numeric.

Value

Returns a summary of accidents in a data frame where the first column reprsents months. Each column are the input years and is filled by the number of accidents happend in each montht. If the input year is not in the data set it returns an error.

Examples

1
2
3
year_input<-c(2013,2014,2015)
fars_summarize_years(year_input)
#fars_summarize_years(c(2013,2014,2015))

hahustat/farsdata documentation built on Sept. 29, 2020, 12:48 a.m.