fars_read_years: Check and create valid years of FARS data

Description Usage Arguments Value Examples

Description

This function creates multiple years of FARS data as specified by the parameter years. The output of the function is a list of as many dataframes as the number of years provided in the parameter. Each dataframe contains only two varibales, year and MONTH. Additionally, the function also provides additional mechanism for handling errors and warnings if the input parameter year is not a valid year to be found in the read files. No messages will be posted if there is no error or wanrings.

Usage

1

Arguments

years

a list or vector containing year specification such as (years=c(2013,2014,2015)) or using (years=list(2013,2014,2015))

Value

This function returs a list of dataframes for each year as specified in parameter (years) of the function. For example if one uses (years=c(2013,2014,2015)) then there will be three dataframes in list mode. Each dataframe will have two columns: Month and year.

Examples

1
2
3
4
## Not run: 
fars_read_years(c(2013,2014,2015))

## End(Not run)

mnazhasan/FarsRpkg documentation built on May 23, 2019, 5:06 a.m.