fars_read_years: Read accident information by Month & Year for multiple FARS...

Description Usage Arguments Details Value Examples

View source: R/fars_function.R

Description

fars_read_years function takes list of years as an argument, create file names, load data files, mutate year and then select month and year. If data for any of the years has been already downloaded then that data is not imported. Instead data from tryCatch is used

Usage

1

Arguments

argument

years takes list of years as an argument.

Details

This function is not designed for direct user interaction. It is a helper function for fars_summarize_years. If any of the objects requested via input is not available as a year file or is not coercible to integer an "invalid year" error message returns.

Value

A list of tibbles. Each tibble contains just two columns of the original FARS data set (MONTH and year). Each row corresponds to a single accident.

Examples

1
2
3
4
## Not run: 
fars_read_years(years = c(2013, 2014))

## End(Not run)

Nilesh1978/fedtrafat documentation built on May 21, 2019, 7:53 a.m.