fars_summarize_years: Summary by year and month of the number of fatal accidents...

Description Usage Arguments Details Value Note Examples

View source: R/fars_functions.R

Description

The function generates a tibble summarising the number of fatal injuries suffered in motor vehicle accidents recorded by the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS). The tibble shows the number of accidents grouped by month and year.

Usage

1

Arguments

years

A vector (or matrix) used to represent the years of the data files to be imported.

Details

The function accepts a years argument and converts the elements from the list generated from the fars_read_years() function into a tibble which summarises the number of fatalities incurred in motor vehicle accidents by month and year.

Value

This function returns a tibble summarising the numbers of fatal accidents by month and year.

Note

A package permitting the use of pipelines ( The dplyr and tidyr packages must be installed in the R environment but do not have to be attached.

Examples

1
2
fars_summarize_years (2013)
fars_summarize_years (c(2013,2014))

gben1750/fatal-car-analysis-reporting-system documentation built on Dec. 20, 2021, 9:49 a.m.