fars_read_years: fars_read_years

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

The function accepts a vector or list of years and returns a list of dataframe with MONTH and year columns based on data in "accident_<year>.csv.bz2 files. The files need to be located in the working directory.

Usage

1

Arguments

years

A vector or list of years in numeric or integer format

Value

Returns a list of dataframe with the same number of rows as the data in "accident_<year>.csv.bz2" files sorted by year and MONTH.

If any of the objects requested via input is not available as a year file or is not coercible to integer an "invalid year" error message returns.

Examples

1
2
3
4
5
6
7
8
## Not run: 
fars_read_years(2013:2015)
fars_read_years(list(2013, 2014))

# Results in a warning
fars_read_years(2016)

## End(Not run)

smallikarjun/MyfarsPkg documentation built on May 23, 2019, 2:01 a.m.