fars_read_years: Extract 'YEAR' and 'MONTH' columns from US yearly accidents...

Description Usage Arguments Value Examples

View source: R/fars_read_years.R

Description

Takes a character or integer vector of years as input, reads the file of each year, and then extracts the YEAR and MONTH columns from each file. Throws a warning and returns NULL. for the unfound file.

Usage

1

Arguments

years

a character or integer vector containing the years

Value

This function returns a list with each element of the list containing the YEAR and MONTH columns of each file. It returns NULL for a file it is not found.

Examples

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

## End(Not run)

M7mdSale7/TestPackage documentation built on Aug. 8, 2020, 6:42 p.m.