fars_summarize_years: total FARS accidents by month and year

View source: R/fars_functions.R

fars_summarize_yearsR Documentation

total FARS accidents by month and year

Description

read FARS data from file and count the number of accidents group_by year and month

Usage

fars_summarize_years(years)

Arguments

years

, a list with all years to be displayed

Details

it is necessary to download the fars files before, this functions read the files from the working directory, if not a warning will be thrown Throws a warning of "invalid year:" if a numeric other than what is available is provided as years

Value

a data.frame with the month and the total of accidents by year

Examples

library(dplyr)
library(readr)
library(tidyr)
fars_summarize_years(c(2013))


jmab20/farsfuncs documentation built on Feb. 25, 2025, 2:36 a.m.