fars_read_years: Read years

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

This function reads specific variables from the data. It reads two specific columns, MONTH and year, from the input files, and then stores them as data frames in a list. It works by calling the function make_filename from within

Usage

1

Arguments

years

A vector of numbers, which represents the years to be analyzed. Can be also a sequence of numbers. This function returns an error, if an year number if invalid.

Value

A list with the data frames in tibble format for the selected years. The list has the length of the input vector and each data frame contains only the selected columns.

Examples

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

## End(Not run)

marmello77/FARS documentation built on Jan. 1, 2021, 9:18 a.m.