fars_read_years: Read months and years columns from FARS data

Description Usage Arguments Details Value Examples

Description

This function, given a vector ov calendar years, returns a list of dataframes containig a the month and year columns from each yearly dataset. The function returns a warning if there is no data file for a given year.

Usage

1

Arguments

years

a vector of integers, or objects that can be coerced into integers, representing specific years of FARS data.

Details

The function uses imported dplyr::mutate() and dplyr::mutate() to prepare the dataframe.

Value

A list of dataframes (one list element per year). Each dataframe contains two columns: MONTH and year, and has as many rows as the source dataset

Examples

1
2
3
my_file <- system.file("extdata", "fars_data.zip", package = "fars")
unzip(my_file, junkpaths = TRUE)
fars_read_years(2013:2015)

vadimus202/fars documentation built on May 3, 2019, 2:41 p.m.