fars_read_years: Read FARS data for a specified year

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

Function that reads one or more csv files, converts them into tbl_df tables, extracts year and month information from these tables and stores the result in a list object with one entry per year.

Usage

1

Arguments

years

A numeric or vector with the year(s) used to select the csv files

Details

The function selects files with names containing one of the year(s) specified by the argument years.

fars_read_years is built on the fars_read and make_filename functions.

Value

This function returns a list with tbl_df tables containing MONTH and YEAR information for each selected year or NULL if the year is not valid.

Examples

1
2
3
4
5
## Not run: 
fars_read_years(2014)
fars_read_years(2013:2015)[[2]]

## End(Not run)

ajsarradin/farsAJS documentation built on May 5, 2019, 8:17 a.m.