fars_read_years: Read in the data on MONTH variable from multiple FARS...

Description Usage Arguments Value Note Examples

Description

This is a function that takes a year or a list of years in numeric format, reads in the FARS data files for the corresponding years, and returns a list of tables for each year. Each table contains only the data for two variables: the year and months for which FARS data are available in that year

Usage

1

Arguments

years

a year in numeric format or a list of such years

Value

This function returns a list, each element of which is a two-column table (tibble) with one column describing the year and the other column describing the month for each observation in the FARS dataset.

Note

providing multiple years that are not in the list format as an argument will cause an error. Also, the function will produce an error if the dplyr package is not loaded.

Examples

1
2
3
4
## Not run: 
fars_read_years(2015)
fars_read_years(list(2014, 2015)) 
## End(Not run)

yuriygdv/farsfunctions documentation built on May 22, 2019, 2:47 p.m.