fars_read_years: Selects all months in each file loaded (year)

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function creates a list of all months in the files.

Usage

1

Arguments

years

a vector with all years that should be loaded

Details

This function uses mutate and select functions from dplyr package. It also calls make_filename function in order to create a string with the filename and fars_read function to load the files in a dataframe of all years specified in the parameter. In case the year required doesn't have a correspondent file it will generate a warning.

Value

This function returns a list with the column month of each file. if the year is invalid a warning will be generated to inform it.

Examples

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

## End(Not run)

TarsoRodriguez/fars documentation built on May 17, 2019, 2:46 p.m.