fars_read_years: Read FARS data for multiple years

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

A helper (not exported) function used by fars_summarize_years Function. It reads in data for all the given years. The function selects the year and month from every observation in the dataset. If an invalid year is given the function generates a warning.

Usage

1

Arguments

years

A numeric or character vector contining the year(s) for which the data should be read in.

Value

This function returns a list of length that equals the length(number of years) of the input vector. Each element of the list contains a data frame with data of the corresponding year.

Examples

1
2
3
4
5
6
7
## Not run: 
fars_read_years(2013)
fars_read_years("2013")
fars_read_years(c(2013, 2014))
fars_read_years(c("2013", "2014"))

## End(Not run)

vbeakovic/fars documentation built on May 14, 2019, 9:39 a.m.