fars_read_years: Does a specific file exist

Description Usage Arguments Details Value Source

Description

This function determines if data is available in the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System for the a years specified by the user. If the file is available then this function reads the data in and begins creating a data frame with Month and year in the columns. If the year is not a year where data is available then an error will be sent to the screen indicating that data is not available. This function will not be called directly by the user. It is called by fars_summarize_years.

Usage

1

Arguments

years

a numerical vector of years, or a vector that can be coerced into a numerical vector. The years when data are available include 2013, 2014, and 2015.

Details

An error will be generated if a year is given and no data is available for that year. This allows the user to be aware of the years when data is available to this package.

Value

This function returns a list. Each element of the list contains the months and year that data is available. If a year is not available an error is returned.

Source

US National Highway Traffic Safety Administration's Fatality Analysis Reporting System


greegreg/fars documentation built on May 31, 2019, 8:07 a.m.