fars_read_years: Reads FARS CSV data for one or more years

Description Usage Arguments Value

View source: R/fars_functions.R

Description

FARS data is available in multiple CSV files, one for each year. This function takes vector of integers representing years and reads each of the respective files. It adds year variable for each obs and returns a list having tibble of months and year for obs found.

Usage

1

Arguments

years

Integer Vector representing one or more years. In case of non-integer value, it will prompt for coercion error. In case of any year, whose data could not be found, error will prompt as invalid year

Value

List of tibbles for each year, having variable for month & year. In case of error, it would return NULL

examples fars::fars_read_years(c(2013,2015)) fars::fars_read_years(2013:2015)


akbarpunjwani/msdr-rpkgexample documentation built on Feb. 22, 2021, 3:59 a.m.