fars_read_years: Read in files for multiple years

Description Usage Arguments Details Value Examples

Description

This function takes a vector of strings or numerics, uses lapply to call make_filename() for each year in the vector, and attempts to read in data for each file name with fars_read.

Usage

1

Arguments

years

a vector of strings or numerics, each in "yyyy" format.

Details

The function then uses mutate() to add a column specifying the year and returns a dataframe consisting of the month and year of each row.

If fars_read() fails to read in data for a particular year, it prints a warning to the user and returns NULL.

Value

A list of dataframes, one for each year in years

Examples

1
2
3
4
## fars_read_years(2014)

## years <- 2013:2015
## data <- fars_read_years(years)

alphaecho1229/Week4Assessment documentation built on May 12, 2019, 10:30 p.m.