fars_read_years: "fars_read_years"

Description Usage Arguments Details Value Note Examples

Description

This is a function that loads the columns MONTH of the accident data for all specified years (specified using the years argument) and returns a list.

Usage

1

Arguments

years

a numeric vector, representing the years for which the accident_data should be loaded.

Details

This function combines the fars_read and make_filename function. The external functions mutate, select, tbl_df and read_csv are included. Therefore the dplyr and readr package has to be installed and loaded.

Value

This function returns list for all the years specified in the years argument. Every entry of the list is a data.frame with the columns year and MONTH.

Note

If for an element of the years argument no file is found a warning occurs.

Examples

1
2
## Not run: myData <- fars_read_years(c(2013,2014))
## Not run: myData <- fars_read_years(2014)

floasdf/finalAssignment documentation built on May 6, 2019, 4:59 p.m.