fars_read_years: Groups together in a new dataframe all accidents by selecting...

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

Groups together in a new dataframe all accidents by selecting only the month and the year referenced in the archive files "accident_year.csv.bz2" from the target years given in the input. This function calls make_file_name and fars_read.

Usage

1

Arguments

years

An integer vector with all the years to extract

Value

If the input is an integer vector as required, it returns a dataframe with n+1 columns : MONTH and n years. Otherwise, when there are no archive files with the target year, it returns a warning like "invalid year: year" and NULL value.

Examples

1
2
fars_read_years(c("2013", "2014")) -> success
fars_read_years(c(2013, 2014)) -> success

axellencls/roadAccidentsStudy documentation built on April 5, 2020, 12:53 a.m.