fars_read_years: Read "Fatality Analysis Reporting System" data specifying the...

Description Usage Arguments Value Note Examples

View source: R/fars_functions.R

Description

The "fars_read_years" function reads yearly data of FARS datasets into a list where each element of the list contains specific data for the given year. You can customize the years of which you want to get more information (using the years argument). The function reads the specified FARS datasets and mutates a new variable ("year") for the certain year, and selects the "MONTH" attribute from the dataset, then gives a list of data tables of these two attributes as a result.

Usage

1

Arguments

years

A number or vector of numbers describing the years to analyze

Value

This function returns a list containing the data tables with two variables ("MONTH", "year").

Note

There is an error handling with a tryCatch() function. In case of any errors, it results in a warning.

Examples

1
2
3
4
5
6
## Not run: 
fars_read_years(2015)
fars_read_years(c(2013, 2014))
fars.year <- fars_read_years(2013)

## End(Not run)

Solymi90/Fars.Assignment documentation built on May 27, 2019, 7:24 a.m.