fars_read_years: Reads FARS data sets for multiple years and creates a list of...

Description Usage Arguments Details Value Examples

Description

This function reads FARS data sets for multiple years from the current working directory and creates a list of tibbles. The list contains as many elements as years were given. Each tibble has two columns: MONTH and year, where year is the given year and MONTH contains the number of the month to which each observation belongs.

Usage

1

Arguments

years

a vector of integers, one for each year for which you want to load the FARS data

Details

This function uses fars_read and make_filename. These functions may throw errors, for example, if files with names for the requested FARS datasets do not exists in the current working directory.

Value

a list of tibbles, one for each year given

Examples

1
2
3
4
## Not run: 
fars_data <- fars_read_years(c(2013, 2014))

## End(Not run)

plexxx/myAssignment documentation built on May 9, 2019, 12:49 p.m.