fars_read_years: Creates a tibble from a year

Description Usage Arguments Value Examples

View source: R/farsfunctions.R

Description

This function reads in a year or a list of years and creates a tibble containing month and year from a standard NHFTS FARS /hrefhttps://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars file containing that year in the filename.

Usage

1

Arguments

years

A string of length 4 giving the year, or list of years, in the NHFTS FARS filename from which the month and year attributes will be summarised.

Value

A tibble containing the MONTH and year attribute for each input year. If a year is entered that does not have the corresponding filename a warning message will be printed to the console.

Examples

1
2
fars_read_years(2013)
fars_read_years(c(2013, 2014, 2015))

csgbloom/farspackage documentation built on May 20, 2020, 10:15 a.m.