fars_read_years: Reading month data from the FARS file for a given year

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function allows for a simplier reading of the data from the US Fatality Analysis Reporting System. It will return two columns - column with a month and column containing a requested year.

Usage

1

Arguments

years

an R object. Must be an integer or a character vector of length 1, containing any year

Details

The function will give a warning if provided with an incorrect year. Note that the function doesn't stop running if it found an error – only produces a warning.

Value

This function returns a tibble object, containing a column with month exported from the data and a year for which the month data was accessed. If provided with miltiple years – it will return a list with data frames inside.

Examples

1
my_df <- fars_read_years(2013)

Liddlle/exmplr documentation built on May 18, 2019, 1:34 p.m.