fars_read_years: fars_read_years

Description Usage Arguments Details Value Examples

Description

fars_read_years produces a list of tibbles of FARS data as per input vector of years.

Usage

1

Arguments

years

Vector of years' FARS files to open. Valid vector element will be integer,string or numeric that can be coerced to integer.

Details

This function takes a vector of years and produces a list of tibbles, where each tibble is that year's FARS file year and MONTH observations. This function produce an output that retain only year and month from the original FARS dataset. To work, this function require a valid year as input argument. otherwise it will return a list with element value is NULL.

Value

This function returns a list of tibbles with two variables : MONTH and year Error handling using tryCatch to validate year input and return NULL for invalid year

Examples

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

## End(Not run)

kanga1988/kangakola_coursera_R_pkg documentation built on May 28, 2019, 2:48 p.m.