fars_read_years: Reads in FARS data for given years

Description Usage Arguments Value Note References Examples

View source: R/fars_functions.R

Description

This function reads US National Highway Traffic Safety Administration's Fatality Analysis Reporting System (FARS) data for given years.

Usage

1

Arguments

years

an array of year numbers, eg. 2014 (integers or strings )

Value

a tibble containing FARS data

Note

The FARS data files are expected to be in the working directory and their names should be of form accident_YYYY.csv.bz2. Missing files cause an error. (The specific FARS data format is as provided by Coursera course Building R Packages by Johns Hopkins Univ.)

References

Fatality Analysis Reporting System Mastering Software Development in R Specialization, Building R Packages by Johns Hopkins Univ., 2020

Examples

1
## Not run: dat <- fars_read_years(c(2013, 2014, 2014))

jhimberg/r_packages_excercise documentation built on April 9, 2020, 11:10 p.m.